So say you have a made up flight booking application. I'm speaking on a very high level; because i'm more concerned with the design of these java objects.
We're creating tests that have these classes
- loginTest.java: logs the user in.
- selectFlightTest.java: selects the flight
- searchFlightTest.java: searches for a flight
- purchaseFlightTest.java: pick a flight
e.g. given the following scenarios:
Test booking a flight in LA, New york, Boise, Chicago, Orlando, etc.
Is it possible to design and group this particular classes into a larger utilityclass that then is a jumping point for other variations of the test? Or to be able reuse as a base class to perform other tests but with different variations?
Or is it important to just copy/paste these tests? It seems using a base java class would allow for more flexibility when like a process changes, etc.