I am new to automation using Appium. So while using Eclipse i created a TestSuite.java file which includes all of my test cases.I want to run this file using JUnit in eclipse through command terminal.Please help me with command in mac.
我是Appium的自动化新手。所以在使用Eclipse的时候我创建了一个包含我所有测试用例的TestSuite.java文件。我想通过命令终端在eclipse中使用JUnit来运行这个文件。请在mac中帮助我使用命令。
I am using macOs. I am adding some screenshots of my project.
我正在使用macOs。我正在添加一些项目的截图。
(1) This is my project in eclipse
(1)这是我在日食中的项目
(2) This is my TestSuite.java file
(2)这是我的TestSuite.java文件
(3) Output after running
(3)运行后输出
mvn surefire:test - DrunSuite=com.appium.automation.MobileGesturesRevised/TestSuite.class
mvn surefire:test - DrunSuite = com.appium.automation.MobileGesturesRevised / TestSuite.class
Output: output in terminal
输出:终端输出
(4) pom.xml file
(4)pom.xml文件
1 个解决方案
#1
2
I think I see a pom.xml in the screen shot so you can run
我想我在屏幕截图中看到了一个pom.xml,所以你可以运行
mvn surefire:test -DrunSuite=com.appium.automation.MobileGesturesRevised/TestSuite.class
You can just create a new run configuration for that under the Eclipse run menu.
您可以在Eclipse运行菜单下为其创建新的运行配置。
#1
2
I think I see a pom.xml in the screen shot so you can run
我想我在屏幕截图中看到了一个pom.xml,所以你可以运行
mvn surefire:test -DrunSuite=com.appium.automation.MobileGesturesRevised/TestSuite.class
You can just create a new run configuration for that under the Eclipse run menu.
您可以在Eclipse运行菜单下为其创建新的运行配置。