Business process:
1. Provide written test cases, read content
2. Then automatically adjust the interface according to the use case content in Excel, determine whether the return value in the expected result is consistent with the value in the return message, generate a test report, send an email to inform
Implementation steps:
1. Read Excel and save the contents of the test case;
2. According to the request URL and parameter stitching request message in Excel, the interface is automatically called and the return message is saved;
3. Read the return message, compare the expected results, generate the test report, and send the message, and write the request message, return message and test result to excel in the test case.
Now I create the bin (launcher), cases (the final test case), conf (settings.py file, configure the sender, receiver, password, log and report directory) directory
Core directory ( get_case,interface_test, Report,SendMail,toolsfor the main process), Data (stored in the test report, in HTML form), logs (log file)
The following for different directories to write code, is not very professional.
The start.py code is as follows:
The Get_case code is as follows:
The Interface_test code is as follows:
The report code is as follows:
The SendMail code is as follows:
The tools code is as follows:
Developing an Automation interface (single thread, test case)