Огурец не может найти определения шагов в Android Studio - PullRequest
1 голос
/ 19 февраля 2020

Я интегрировал Cucumber с Android Studio. Кажется, что Android Studio может найти правильный файл для размещения определений шагов, потому что она предлагает реализовать их из файла .feature в правильный файл .java. Однако, когда я запускаю функцию, она говорит, что шаги не определены.

Вот зависимости класса:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.2.0-alpha01'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta4'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.jakewharton:butterknife:10.2.1'
    implementation 'com.google.android.material:material:1.2.0-alpha03'
    implementation 'com.google.android.libraries.places:places:2.2.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.google.android.gms:play-services-places:17.0.0'
    implementation 'com.google.android.gms:play-services-wallet:18.0.0'
    implementation 'com.android.support:appcompat-v7:28.0.0'

    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.3.0-alpha03'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'info.cukes:cucumber-junit:1.0.14'
    androidTestImplementation 'info.cukes:cucumber-android:1.2.5'
    androidTestImplementation 'info.cukes:cucumber-picocontainer:1.2.5'
}

Конфигурация огурца

package app.waxbee.stepdefinitions;

import org.junit.runner.RunWith;

import cucumber.api.CucumberOptions;
import cucumber.junit.Cucumber;

@RunWith(Cucumber.class)
@CucumberOptions(features = "resources/features", glue = "app.waxbee.stepdefinitions")
public class CucumberTestCase {

}

И структура проекта:

https://i.stack.imgur.com/nKWSH.png

Я новичок в этой структуре, поэтому, если вы видите что-либо, что можно улучшить, я глубоко ценю ваши учения по улучшению. Заранее спасибо.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...