开发者

Is there any way to connect the Database server from Selenium RC?

Does anyone know how to connect DB from Selenium RC? I need to run a lot of user IDs and passwords with different role access. Currently I am using t开发者_运维技巧his as data suite with an HTML file.


Well, I know that Selenium tests can be outputted and run as as JUnit tests. From JUnit you can easily write test infrastructure that connects to your DB and does whatever else you need it to do.

Edit: You're of course not limited to JUnit and Java. You can run Selenium via Ruby, .Net, Python or pretty much whatever you'd like.


You cannot connect to the database with Selenium RC. Selenium RC is just a small program that listens on a port and does things to the browser. It does not know about where the data you are testing comes from.

As Mike said above, you can export or write your tests either in your favorite programming language or some testing framework. This allows you to create a DB connection, preload your database with data (like your users/roles) and do your tests in a more dynamic and maintainable fashion.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜