小编1ak*_*sha的帖子

停止Android Studio shell进程不会停止测试

我正在从shell脚本执行一些gradle任务,并且发现我无法终止该进程:

在此输入图像描述

我单击图像中显示的停止过程,但它不会阻止Espresso UI测试在模拟器上执行.shell脚本就像"./gradlew spoonDebugAndroidTest"一样简单

有没有我可以在不关闭模拟器的情况下停止测试,并摆脱红框说我有进程运行?

shell android-studio android-espresso

14
推荐指数
1
解决办法
1739
查看次数

麻烦让黄瓜重新运行插件通过终端工作

我正在使用用java编写的用于ui测试的黄瓜.我正在尝试实现黄瓜插件来重新运行失败的场景,并创建了第二个类作为这些场景的跑步者:

头等舱

@RunWith(Cucumber.class)
@CucumberOptions(
        monochrome = true,
        strict = true,
        tags = {"@lakeisha"},
        features = ".",
        format = {"html:target/cucumber", "json:target/cucumber.json"},
        plugin = {
                "pretty", "html:target/cucumber-reports",
                "json:target/cucumber.json",
                "rerun:src/test/resources/rerun.txt" //Creates a text file with failed scenarios
        })
public class RunCukeTestsIT extends BaseCucumberRunner {
}
Run Code Online (Sandbox Code Playgroud)

第二课:

@RunWith(Cucumber.class)
@CucumberOptions(
        monochrome = true,
        tags = {"@lakeisha"},
        features = "@src/test/resources/rerun.txt", //Cucumber picks the failed scenarios from this file
        format = {"html:target/cucumber", "json:target/cucumber.json"}
)
public class ReRunCukeTestsIT extends BaseCucumberRunner{

}
Run Code Online (Sandbox Code Playgroud)

我正在使用测试

mvn clean verify -Dcucumber.options=" --tags @lakeisha" …
Run Code Online (Sandbox Code Playgroud)

java cucumber maven cucumber-jvm

6
推荐指数
0
解决办法
506
查看次数

无法在空手道功能文件中打印标题

我正在使用空手道 ( https://github.com/intuit/karate ) 进行一些 API 测试,并使用无效标头进行测试。我想在调试时打印标题,以确保一切设置正确。这就是我设置和尝试打印的方式,但没有任何效果。我可以在文档中找到任何关于它的内容。有人知道吗?非常感激!!

Given path '/metadata/project/' + projectID + '/graph/' + graphID
And headers { Authorization: 'INVALID', Content-Type:#(headerValue)}
And request graphJSON
* print headers // prints nothing
* print requestHeaders  // prints nothing
* print requestHeader   // prints nothing
* print header // prints nothing
When method put
Then status 401 // this passes, so i know the header is being set
* print response // prints correctly
* print responseHeaders //prints correctly
Run Code Online (Sandbox Code Playgroud)

如何打印将发送的标题?

karate

2
推荐指数
1
解决办法
2932
查看次数