私はこのキュウリのプロジェクトを実行している問題を抱えています。それは、8、20および32eclipseでbddでキュウリを実行する
以下package stepDefinition;
import cucumber.api.java.en.Given;
public class aptitudeTest {
@Given ("I have successfully ([^\"]*)")
public void I have (String str)
{
if (str.equals("registered"))
{
System.out.println("registered Automation");
}
{
System.out.println("unregistered Automation");
}
}
@When ("I enter my valid ([^\"]*)")
public void I enter (String str)
{
if (str.equals("credentials"))
{
System.out.println("credentials Automation");
}
{
System.out.println("details Automation");
}
}
@Then ("I should see the welcome ([^\"]*) him")
public void I should (String str)
{
if (str.equals("welcome"))
{
System.out.println("welcome to your account");
}
{
System.out.println("please enter the correct credential");
}
}
}
はフィーチャーファイル
Scenario:I should see a message when i successfully logged in
Given I have successfully registered
When I enter my valid credentials
Then I should see the welcome message
私は無礼を意味しませんが、あなたの最善のステップは、入門的なJavaクラスを取ることです。 –
メソッド名の付け方を見てください。名前にスペースは使用できません。 https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html#naming – Grasshopper