JSON Example in Webtestit


Hi, has anyone got example code for how to get JSON working within a webtestit project.

The project we’re looking at requires running the same tests over different instances of our CRM, but different instances have different test data & some have slightly different tests to run.

What I was thinking of was having a JSON config file which you’d load which would tell Webtestit the data it needed - i.e the login credentials, what search criteria to enter on the search page and what it needed to look for in the results.

I see from the code insight that is has access to JSON as part of the selenium java classes, but I can’t see any examples in Webtestit anywhere.



Hello @EngageCRM!
So as I understood, you need some kind of a data-driven approach for this. Have you tried out our Data-driven sample projects?
The same can be accomplished using CSV files, like in the sample, store your different set of data and execute them using the data provider.
Also, you could set up different parameters to execute with your test for different instances or environments. Please take a look at this topic on how to pass parameters to test execution