[英]How to Run TestNG using Linux Shell file
I am using following working command for Windows batch file. 我正在对Windows批处理文件使用以下工作命令。
set projectLocation=E:\APPIUM\CXMFunctionalTest\LinuxAPITest
cd %projectLocation%
set classpath=%projectLocation%\bin;%projectLocation%\lib\*
java org.testng.TestNG %projectLocation%\testng.xml
pause
How i can convert this into Linux Shell Script
? 我如何将其转换为
Linux Shell Script
? So i can run it in Linux machine. 所以我可以在Linux机器上运行它。
cd /home/[[youruser]]/APPIUM;
java org.testng.TestNG /home/[[youruser]]/APPIUM/testng.xml;
This should be sufficient, considering that [[youruser]]
is your users home folder, and the APPIUM
folder is placed directly inside it. 考虑到
[[youruser]]
是用户的主文件夹,并且APPIUM
文件夹直接放置在其中,就APPIUM
了。 Then you can put this in a file called runappium.sh
, and run it with the command sh appium.sh
or mark it executable and run it directly. 然后,可以将其放在一个名为
runappium.sh
的文件中,并使用命令sh appium.sh
运行它,或将其标记为可执行文件并直接运行它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.