简体   繁体   English

是否可以将Selenium测试用例打包到可运行的应用程序中

[英]Is it possible to package Selenium test cases into a runnable appliction

I am creating selenium test to test a web app. 我正在创建硒测试来测试Web应用程序。 I also want to be able to use these test cases as a way for non technical users to automate the first few steps of the process. 我还希望能够将这些测试用例用作非技术用户自动化该过程的前几个步骤的方法。 ~Is this possible? 〜这可能吗?

If you are using testng, generate command to run XML from the command line and then copy the same command to .bat or .cmd file. 如果使用的是testng,请从命令行生成命令以运行XML ,然后将同一命令复制到.bat或.cmd文件。 By a click any user can run those tests/suite. 通过单击,任何用户都可以运行那些测试/套件。

Of course you can, Selenium automates browsers, it is not a 'test library' you can use it in any program. 当然可以,Selenium可以自动执行浏览器,它不是可以在任何程序中使用的“测试库”。 Just write java program where you use selenium. 只需在使用硒的地方编写Java程序即可。

You can also write tests (in JUnit or TestNG or any other test runner) and run tests programmatically. 您还可以编写测试(在JUnit或TestNG或任何其他测试运行器中)并以编程方式运行测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM