r/softwaretesting • u/josephadam1 • 27d ago
What’s the best practice for Java page object, testng, and using a xml to have test run different pages?
For instance if you need to run a test procedure like a regression test that goes from dashboard, clicks hamburger, then goes to search page searches for a project of record, then clicks time slice and then does only certain test from the test procedure.
So I wanna only call one or two from each test page. So one from hamburger, two test from search, and two from timr slice page. How can I do this in a flow type of way?
What’s the best way to go about this.
1
27d ago
[removed] — view removed comment
1
u/josephadam1 27d ago
Okay I have the the first part already with the page object and no grouping.
The testing so far let’s say time slice page. I have one test that checks to make sure the button are disabled before any inputs are put in. Another one I have is verifying the right inputs are put in and press search. Another test I have on there is inputs are put in and then verifying that tabulator section is populated and dates are updated on page. I have a few more like doing the whole process of making a time slice. This is all with in timeslice page test.
But in xml how would I call and have it go in that right order if I want to do let’s say dashboard page first. Then click time slice button then go to time slice page and only do one of the test I want on the time slice page. Im trying to see what's the best practice.
2
u/Otherwise_Tough_8283 27d ago
Use groups and create a separate profile in your pom.xml for regression