Running Web UI Test Scripts in Viper

Running your Selenium Web UI test automation suite in Viper is very much structured and easier. Lets look at how we do it with our sample script...


  • Viper is included with the latest Selenium dependency and its located in pom.xml file. 

  • Next look at the Page Factory folder where all your page classes and reusable page objects are stored...Here for the sample we have Login and Home Page classes stored. 

  • Next look at the Extent Report folder to see the API implementations of Extent Reporting...This provides the test automation execution reporting capability to your suite.

  • The data driven capability can be achieved with the Excel as well as JSON. Go to the Utility folder and you can see that there is a JSON reader class implemented which will read a given JSON file in the data folder with the given JSON object.

  • For Excel based data driven you can use the Read Excel class in the Read Excel package, which will get any data value from any row and column, given sheet in any file under the Data folder. 
  • Test scripts can be created under the Test package and you can look and execute the Login Test under that package to see the execution. 


  • Please also note that you do not need to load the chrome driver or gecko driver separate as it will be loaded automatically with Web Driver Manager.


  • To create your BDD based scenarios, you can write them in the features folder provided in the framework. 
  • All your step definitions should be implemented in the stepdef package and Viper uses Test NG cucumber to run your BDD scenarios.

No comments:

Post a Comment