selenium RC 是否使用 java -jar 选项运行 c# 测试?

发布于 2024-09-09 11:16:08 字数 374 浏览 5 评论 0原文

是否有任何选项可用于直接使用 selenium 服务器运行 c#/.NET 测试,例如以下基于 html 的测试选项?

( java -jar selenium-server.jar 基于 C# 的测试/套件)

-htmlSuite :运行 单个 HTML Selenese (Selenium Core) 套件,然后退出 立即,使用指定的浏览器(例如“*firefox”) 指定的网址(例如“http://www.google.com”)。您需要指定 HTML 测试套件的绝对路径以及 我们将生成 HTML 结果文件。

谢谢!

Is there any option available to run c#/.NET tests directly using selenium server like following option for html based tests?

( java -jar selenium-server.jar C# based tests/suites)

-htmlSuite : Run a
single HTML Selenese (Selenium Core) suite and then exit
immediately, using the specified browser (e.g. "*firefox") on the
specified URL (e.g. "http://www.google.com"). You need to specify
the absolute path to the HTML test suite as well as the path to the
HTML results file we'll generate.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

泪之魂 2024-09-16 11:16:08

要运行 C# 测试,您需要使用

java -jar selenium-server.jar

运行 Selenium 服务器,然后需要编译测试并使用 .NET 测试框架,如 NUnit、MBUnit 或 MSTest。

To run your C# tests you will need to have the Selenium server running with

java -jar selenium-server.jar

and then you will need to compile the tests and use a .NET testing framework like NUnit, MBUnit or MSTest.

北城挽邺 2024-09-16 11:16:08

嗯,C# 测试不是 java,所以我会说不。我猜你必须创建 c# 类,或者运行 selenium 的 c# API 的东西,或者使用 nUnit。也许我误解了这个问题?

Well, the C# tests aren't java, so I'd say no. Guess you'd have to create a c# class, or something to run the c# API for selenium, or use nUnit. Maybe I'm misunderstanding the question though?

野の 2024-09-16 11:16:08

Selenium-RC 充当 Web 服务器。它以两种方式接受命令(以“selenese”形式)——通过 HTML 文件或通过 HTTP 请求。 (如果您使用 -interactive 标志启动它,它也可以在命令行上接受它们)。

各种客户端语言都是封装 HTTP 协议的 API。如果您使用 C#,那么您需要编写一个 C# 程序(可能使用 NUnit 或其他一些基于 .NET 的单元测试工具)。

如果您想要使用单命令选项来启动 Selenium-RC 服务器并运行测试,则需要让测试工具执行 java -jar selenium-server.jar 命令启动,然后在最后向其发送关闭命令。

Selenium-RC acts as a web server. It accepts commands (in "selenese") in two fashions - via a HTML file, or via HTTP requests. (It can also accept them on the command line if you start it with the -interactive flag).

The various client languages are APIs that wrap the HTTP protocol. If you are using C#, then you need to write a C# program (possibly using NUnit, or some other .NET-baesd unit testing tool).

If you want a single-command option that will launch the Selenium-RC server and run your tests, you'll need to get your testing tool to execute the java -jar selenium-server.jar command on startup, and then send a shutdown command to it at the end.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文