如何在多場景中運行黃瓜中的特定場景?如何在黃瓜中運行特定場景
特性文件
Feature: Test Milacron Smoke scenario
Scenario: Test login with valid credentials
Given open firefox and start application
When I click on Login
And enter valid "[email protected]" and valid "[email protected]"
Then Click on login and User should be able to login successfully
Scenario: Test shop for cart
Given Click on shop for carts
And select plates
When Click on Add to cart
Then product should be added in the cart successfully
And verify the product
Scenario: Test login with valid credentials1
Given open firefox and start application
When I click on Login
And enter valid "[email protected]" and valid "[email protected]"
Then Click on login and User should be able to login successfully
Scenario: Test shop for cart1
Given Click on shop for carts
And select plates
When Click on Add to cart
Then product should be added in the cart successfully
And verify the product
測試運行
package runner;
import org.junit.runner.RunWith;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@Cucumber.Options(features="features",glue={"steps"},format = {"pretty", "html:target/Destination"})
public class TestRunnr {
}