Is it possible to accept user input prior to test execution?
Hi All. I have a test which calls an API. This API compares two tables and gives an output. These tables can be of different entities and kept and different locations. I want to give end user a choice to select entity and location prior to test execution. How can this be done? Also user's choice would have to be captured as a variable and passed on to the API. How can that be done?
Best Answers
-
You could set up multiple Excel worksheets, each of which has the different inputs that you want to choose from. You could then use a Data Group data source within your test scenario. The Data Group data source will allow you to easily switch between different Excel data sources, and using it you can choose the Excel data source that contains the set of data the user wants for that test run. The user can select which Excel data source to use in the Data Group data source either from the UI, or by specifying an argument during command line execution. See the SOAtest documentation for more details on Data Group data sources.
5 -
If the look-up information is already available, you may add the datasource (e.g, Excel, CSV, table) to your test suit and simply select the specific row of data you wish to compare against the service response or against a second datasource. For example:
5
Answers
-
Hello Ankit,
For your scenario, is the user already aware of the table entity and location prior to test execution? Or is a prior API call made to retrieve this information? You can store your table information (id/location) in a datasource and simply parameterize your desired values into your request payload.
0 -
Yes, user would already know which entity to choose and where its data resides. The challenge is that there r more than 100 entities and each one at a different location. Also each user might want to select a different entity for comparidon. Hence the idea to take user input in the beginning, based on which location details can be fetched from excel workbook.
0