Android で簡単な Cucumber BDD テストをテストしていますが、cucumber エラーが発生します。
org.picocontainer.PicoCompositionException: Either the specified
parameters do not match any of the following constructors: [private
java.lang.Class()]; OR the constructors were not accessible for
'java.lang.Class'
このエラーがどこから来ているのかわかりません。何か不足していますか?
私の機能ファイル
Scenario Outline: Test scenario
Given I have a TestActivity
Then I should see <text> on the display
Examples:
| text |
| 123 |
| test |
ステップ定義
@CucumberOptions(features = "features", format = "pretty")
public class TestActivitySteps extends ActivityInstrumentationTestCase2<TestActivity> {
public TestActivitySteps(Class<TestActivity> activityClass) {
super(activityClass);
}
@Given("^I have a TestActivity$")
public void I_have_a_TestActivity() {
assertNotNull(getActivity());
}
@Then("^I should see (\\S+) on the display$")
public void I_should_see_s_on_the_display(final String s) {
onView(withText(s)).check(matches(isDisplayed()));
}
}
ノート:
- アンドロイドスタジオ: 1.0.2
- グラドル: 2.2.1
- キュウリ: 1.2.0
- エスプレッソ: 2.0