简体   繁体   English

在Ruby中进行硒测试后如何生成结果?

[英]How to generate results after selenium test in Ruby?

I have recently started using ruby to write tests for selenium but I would like a way for the tests to be exported into a results file. 我最近开始使用ruby编写硒的测试,但是我希望将测试导出到结果文件中。

For an example of what i mean. 对于我的意思的例子。 I was exporting the tests from the IDE to html and then running them using 我将测试从IDE导出到html,然后使用

java -jar selenium-server-standalone-2.39.0.jar -htmlSuite *firefox http://google.com /path/to/suite.html /path/to/results.html

in the command line and it would run the suite.html and then post the results in results.html 在命令行中,它将运行suite.html,然后将结果发布到results.html中

Is this possible in Ruby? 在Ruby中有可能吗?

Looks like someone has already taken on the same challenge before. 看起来以前有人已经接受过相同的挑战。 See this article how to export results when running selenium ruby webdriver scripts to output files from command prompt ruby window . 请参阅本文, 了解如何在运行selenium ruby​​ webdriver脚本以从命令提示符ruby窗口输出文件时导出结果

You may have to write up a rake file, but I believe it will be a good experience that will make you better acquainted with ruby and how to go about selenium testing with it. 您可能需要编写一个rake文件,但是我相信这将是一个很好的体验,它将使您更好地了解红宝石以及如何使用它进行硒测试。

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

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