I used @Stepwise for automation. 8 test methods are running sequentially to complete the process. One of the methods take parameter and I want to pass different parameters to the method.
But the problem is: The method takes first set of parameter, then parameters are processed AND instead of proceeding to the next method, the method takes next set of parameter.
The source looks like:
@Stepwise
class AOSearchPageTest extends GebReportingSpec
{
def "first_method"()
{
}
def "second_method"()
{
when:
at particularPage
then:
process(area)
process(coutntry)
process(airport)
process(dest_area)
process(dest_coutntry)
process(dest_airport)
where:
area << ["asia","europe"]
country << ["japan","uk"]
port << ["narita","london"]
dest_area << ["asia","europe"]
dest_country << ["korea","italy"]
dest_port << ["seul","florence"]
}
def "third_method"()
{
//Some other processing
}
The second method first populate with the "asia","japan","narita","asia","korea","seul"
and instead of executing "third_method"(), it takes second set of parameter europe,uk,london,europe,italy,florence.
How I can process each set of data so that all methods [defs] will be executed top to bottom for each set of data?