如何在多场景中运行黄瓜中的特定场景?如何在黄瓜中运行特定场景
特性文件
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 {
}