I understand how this happens when I really do have ambiguous steps,
but
in my simple case, I don’t. I only have a single class which contains
steps
(attached below). I can run a single scenario just fin, but when I try
to
run multiple scenarios in one run, I get Ambiguous step errors. It’s
like
the steps are getting added again before each scenario runs - I’ve got
to be
missing something really basic here.
thanks in advance, John
PS: Here’s the one, and only one, step class that I’m using
(implementation
removed for shortness):
package com.timeinc.ecommerce.storytests.cucumber;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import
org.springframework.context.support.ClassPathXmlApplicationContext;
import com.thoughtworks.selenium.Selenium;
import com.timeinc.ecommerce.KickOffFulfillment;
import com.timeinc.ecommerce.domain.FulfillmentTransaction;
import com.timeinc.ecommerce.domain.Order;
import com.timeinc.ecommerce.domain.PersistenceService;
import com.timeinc.ecommerce.storytests.StoryTestProperties;
import com.timeinc.ecommerce.storytests.checkers.OrderChecker;
import com.timeinc.ecommerce.storytests.selenium.Page;
import com.timeinc.ecommerce.storytests.selenium.ReceiptPage;
import com.timeinc.ecommerce.storytests.selenium.SeleniumController;
import cucumber.Given;
import cucumber.Table;
import cucumber.Then;
import cucumber.When;
public class NavigationSteps {
@Given(“the microsite with”)
public void givenTheMicrosite(Table table) {
}
@When(“I navigate to the microsite”)
public void whenTheUserNavigatesToTheMicrosite() {
}
@When(“I submit the form with”)
}
@Then(“I see a receipt page”)
public void theUserIsPresentedWithAReceiptPage() {
}
@Then(“a new order is created with”)
public void aNewOrderIsCreatedWith(Table table) {
}
@Then(“the following error messages are displayed”)
public void theFollowingErrorsShouldBeDisplayed(Table table) {
Page.ensureErrorsAreDisplayed(selenium, table);
}
@When(“fulfillment runs”)
public void fulfillmentRuns() throws Exception {
}
@Given(“an order exists in the system”)
public void anOrderExistsInTheSystem() {
}
@When(“the user navigates to the status tracking page for the order”)
public void navigatesToStatusTrackingPage() {
}
@Then(“the transaction is displayed as succeeded”)
public void theTransactionIsDisplayedAsSucceeded() {
}
}