项目结构:
parent_module
|_api
| |_src
| |_test
| |_java
| | |_behavior
| | | |_step -> ApiSteps.class
| | |
| | |_runner
| | |_TestRunner.class
| |
| |_resources -> features
|
|_common
| |_src
| |_main
| |_java
| |_name.package
| |_step
| |_BaseStep.class
|
|_web
|_...
TestRunner.class:
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(features = {"src/test/resources/features"},
glue = {"name.package.behavior.step", "behavior.step"})
public class TestRunner {...}
运行测试时(首先 mvn install for common,然后 mvn verify for api),common 中的步骤将被忽略。Serenity 报告突出显示为待处理。
找不到带步骤的类。
我怎么解决这个问题?也许有人遇到过类似的,提前谢谢你。