开发者

HttpResponse, HttpRequest, WebClient

Where should I begin a开发者_如何学Pythons a best practice to simulate a web browser as most easiest way?

I have built up an regular user login, and a update-user-info (test project things) on a webform which I now wan't to simulate a fill-in, programmically. How do I keep the Sessions and put my own values into the specific input-forms, simulate click on buttons and links?

The steps of the project is login (username / password) find link to form (some random links/text) fill in form (some inputs) click save (which confirm to me by mail)


Have you considered using a tool such as http://seleniumhq.org/

Selenium IDE is a Firefox add-on that records clicks, typing, and other actions to make a test, which you can play back in the browser.


If I understand your question correctly, sounds like you're looking for a web form test client. If you're using VS2010 Premium or higher, you can use a Coded UI Test to simulate what you describe -- open up a browser, log in to a site, fill out a form, submit it (using data driven from an external source), and validate the results.

Take a look at Coded UI Tests here to see if this meets your needs.

Here's also a video from Channel9 that's a decent walk-through intro of Coded UI Tests.

Hope this helps!


Seems to me that you are looking for a framework to unit test your application.

The best framework to test your web apps out there is Selenium according to my knowledge.

Here is the article that gives you an idea on how to start out with this framework. Hope this helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜