This commit is contained in:
louiscklaw
2025-01-31 19:51:33 +08:00
parent 78d53aeddb
commit 118e4a5f39
125 changed files with 4895 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
import csv
print('''# TEST plan
### Test purpose
1. Validation on the input data and display appropriate error messages
1. Test Plan with test cases and test results.''')
print('\n')
print('\n')
print('\n')
# read a csv file named test.csv
with open('test.csv', 'r') as f:
# creating a csv reader object
csvreader = csv.reader(f)
# extracting each data row one by one
for row in csvreader:
print(f'### Test #{row[0]}')
print('\n')
print(f'| del me | del me |')
print(f'| ----- | ----- |')
print(f'| Test Case Name | {row[1]} |')
print(f'| Procedure | {row[2].replace("<br />",'\\n')} |')
print(f'| Expected Output | {row[3].replace("<br />",'\\n')} |')
print(f'| Result | {row[4].replace("<br />",'\\n')} |')
print('\n')
print("### Screen capture")
print( '\n'.join([ (f'\n#### step {i+1} screenshot\n'+x.strip()) for i, x in enumerate(row[5].split("<br />"))]) )
print('\n')
print('\n')