Annotation Type Before
@Retention(RUNTIME) @Target(METHOD) public @interface BeforeMethod annotation to mark clean up methods, that is run after every scenario (The annotation is scenario mode only). Use methods, for instance, to release resources and clean up the testing environment. If simulation contains multiple scenarios, then before and after methods will be run global and after every scenarios in the simulation.
If the simulation is need to be set up you might prefer to use
Preparestatic method - and
CleanUp, respectively, which is called before the simulation run for every user. Prepare and clean up static methods might be handy e.g to create some resources for simulation, and release them after after simulation.
- Erhan Bagdemir