2017-11-06 8 views
1

私はキュウリの日食プラグインをインストールしました。私は空手に私のシンプルなフィーチャーファイルを書いており、これをキュウリテストとして実行しようとしていたときに、欠落しているステップを実装するように求められました。専用のランナーで同じ機能ファイルを実行すると、問題なく実行されます。これについて助けてください。私はあなたが間違ったキュウリEclipseプラグインを有していても、あなたには、いくつかのマイナーな設定を行う必要があり、専用のランナーカラットで書かれた機能ファイルをeclipseでキュウリの機能として実行することはできません

Scenario: Validate that the sample webservice is up and running 
Given url sampleUrl 
When method get 
Then status 200 

Scenario: Validate a Json key value pair from the received response 
Given url sampleUrl 
When method get 
Then status 200 
And match $.RestResponse.result contains {name: 'United States of America', alpha2_code: 'US', alpha3_code: 'USA' } 

*** Console output 
Feature: Test a sample RESTFUL webservice 
15:05:10.725 INFO - Starting scenario: Validate that the sample webservice is up and running 
15:05:10.725 INFO - Ending scenario: Validate that the sample webservice is up and running 
15:05:10.741 INFO - Starting scenario: Validate a Json key value pair from the received response 

    #Test Scenarios 
    Scenario: Validate that the sample webservice is up and running # C:/Users/sxs8680/git/BDDCucumberJVM/src/test/java/com/thd/common/karatesupport/karatesample.feature:6 
    Given url sampleUrl 
    When method get 
    Then status 200 
15:05:10.741 INFO - Ending scenario: Validate a Json key value pair from the received response 

    Scenario: Validate a Json key value pair from the received response             # C:/Users/sxs8680/git/BDDCucumberJVM/src/test/java/com/thd/common/karatesupport/karatesample.feature:11 
    Given url sampleUrl 
    When method get 
    Then status 200 
    And match $.RestResponse.result contains {name: 'United States of America', alpha2_code: 'US', alpha3_code: 'USA' } 

2 Scenarios (2 undefined) 
7 Steps (7 undefined) 
0m0.006s 


You can implement missing steps with the snippets below: 

Given("^url sampleUrl$",() -> { 
    // Write code here that turns the phrase above into concrete actions 
    throw new PendingException(); 
}); 

When("^method get$",() -> { 
    // Write code here that turns the phrase above into concrete actions 
    throw new PendingException(); 
}); 

Then("^status (\\d+)$", (Integer arg1) -> { 
    // Write code here that turns the phrase above into concrete actions 
    throw new PendingException(); 
}); 

Then("^match \\$\\.RestResponse\\.result contains {name: 'United States of America', alpha(\\d+)_code: 'US', alpha(\\d+)_code: 'USA' }$", (Integer arg1, Integer arg2) -> { 
    // Write code here that turns the phrase above into concrete actions 
    throw new PendingException(); 
}); 

答えて

1

を使用せずに、このテスト実行を取得しようとしています。

ドキュメントのこのセクションを参照してください:Troubleshooting Cucumber IDE support

+1

ありがとうございました。正しいプラグインをインストールして、私のプロジェクトで持っていた依存性を少しでも取り除いて問題を解決しました。 – saravanan17

関連する問題