jeudi 24 décembre 2020

Manage large amount of environment specific test data in testNG

I have an enterprise android application and a package created for testing the app. The package runs on a framework that uses Appium and testNG. The test package has various tests that check the content, labels, functionality of the app. The package is able to run tests on the app in various stages like alpha, beta.. All the different stages have different test data.

For example, let's take a food delivery application. In this application, the testing is done through a test package that can run in various development stages (alpha, beta, gamma, prod). There can be different types of orders like with long and short distances, discount and without discount, delivery orders and dine-in bookings etc. which will be different for different stages.

I need a way of managing this test data in a generic way in JAVA. Like in JS, we can have TestData.BETA.DISCOUNT_ORDER.EMAIL_ID, TestData.PROD.DISCOUNT_ORDER.EMAIL_ID

I have tried java relflection but it becomes very complex when dealing with maps, innerclasses and maps inside innerclasses.

Aucun commentaire:

Enregistrer un commentaire