如何使用 mvn robotsframework 运行单个测试用例? [英] How to run a single test case using mvn robotframework?
问题描述
我正在尝试使用 mvn robotsframework 在机器人框架中运行测试用例.但是当我这样做时,它会运行套件中的所有测试用例,而不是单个测试用例.我还尝试使用机器人测试用例 -testcase.robot.它也给出了错误.
I am trying to run a test case in robot framework using mvn robotframework. But when i do it runs all the testcases in the suite rather than a single testcase. I also tried to user robot testcase -testcase.robot. It is also giving error.
有人可以帮忙解决这个问题吗?
Can anyone help regarding this ?
推荐答案
您可以通过此命令指定运行测试用例
You can assign run a test case by this command
假设我们在该目录中有一个名为 Tests 的目录,我们有 Test.robot,其中包含 5 个不同的测试用例登录"注册"删除用户"更新用户"随机测试"
Lets say we have a directory called Tests inside that directory we have Test.robot which contains 5 different test cases "Login" "Register" "Delete User" "Update User" "Random Test"
Tests
|
|_ Test.robot
您可以使用以下命令执行单个测试用例
You can use the following command the execute a single test cases
robot Tests/Test.robot -t "Login"
此命令只会执行登录测试用例
This command will only execute the Login test case
这篇关于如何使用 mvn robotsframework 运行单个测试用例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!