问题
For a login page automation, a user need to enter user id, security answer and password. Different environment have different users. For example, users for qa and dev environments have different user id, security answer and password. So how to handle user information properly in the automation test? We can store all the properties in the properties file, any other better solutions?
回答1:
You can try Data Driven Framework automation test. Collect your data input in external file like excel csv, and read the data with the many libraries available online, maybe this link will help you find a solution :
- Read excel file with Apache POI
- Read csv file
来源:https://stackoverflow.com/questions/57312482/how-to-handle-different-users-in-different-environments