Questions tagged [webtest]

WebTest helps you test your WSGI-based web applications, which includes most actively developed Python web frameworks.

WebTest helps you test your WSGI-based web applications. This can be any application that has a WSGI interface, including an application written in a framework that supports WSGI (which includes most actively developed Python web frameworks – almost anything that even nominally supports WSGI should be testable).

With this you can test your web applications without starting an HTTP server, and without poking into the web framework shortcutting pieces of your application that need to be tested. The tests WebTest runs are entirely equivalent to how a WSGI HTTP server would call an application. By testing the full stack of your application, the WebTest testing model is sometimes called a functional test, integration test, or acceptance test (though the latter two are not particularly good descriptions). This is in contrast to a unit test which tests a particular piece of functionality in your application. While complex programming tasks are often is suited to unit tests, template logic and simple web programming is often best done with functional tests; and regardless of the presence of unit tests, no testing strategy is complete without high-level tests to ensure the entire programming system works together.

WebTest helps you create tests by providing a convenient interface to run WSGI applications and verify the output.

To find out more, visit http://webtest.pythonpaste.org/en/latest/

270 questions
6
votes
2 answers

Unit testing authorization in a Pylons app fails; cookies aren't been correctly set or recorded

I'm having an issue running unit tests for authorization in a Pylons app. It appears as though certain cookies set in the test case may not be correctly written or parsed. Cookies work fine when hitting the app with a browser. Here is my test case…
Ian Stevens
  • 794
  • 4
  • 19
6
votes
2 answers

WebTest for SignalR possible?

if I send a request, and I expect the response to come trough SignalR, is it possible to test this using a LoadTest or PerformanceTest in Visual Studio?
Ryan
  • 5,456
  • 25
  • 71
  • 129
6
votes
3 answers

Testing Image upload with Django and Webtest

Does anyone know how I can test the image upload with using WebTest. My current code is: form['avatar'] =('avatar', os.path.join(settings.PROJECT_PATH, 'static', 'img', 'avatar.png')) res = form.submit() In the response I get the following error…
Ilian Iliev
  • 3,217
  • 4
  • 26
  • 51
6
votes
1 answer

Issue with nosetests and file uploads

I've been searching the web for the last two days trying to understand the problem I'm having with WebTest. However, I have had no joy, and was wondering if anyone here might be able to help. I'm using nose to run test on a web application that I'm…
Mr-F
  • 871
  • 7
  • 12
6
votes
2 answers

Selenium: difference between "role hub" and "role webdriver"?

I'm using Selenium for automated testing. What's the difference between java -jar selenium-server-standalone-2.24.1.jar -role hub and java -jar selenium-server-standalone-2.24.1.jar -role webdriver ? It seems to be the same. Or is there any…
ccman
  • 1,283
  • 2
  • 10
  • 10
5
votes
1 answer

VSTS Web Performance Test - AJAX requests recorded in wrong order?

I'm new to using VSTS and I'm trying to create some web tests to form a load test for an ASP.NET WebForms app I've inherited. The site heavily uses 'AJAX Pro', an AJAX framework that was about before Microsoft released their AJAX framework with…
David Masters
  • 8,069
  • 2
  • 44
  • 75
5
votes
1 answer

Can I check non-html responses in geb?

Geb is a nice framework for testing web applications, as there is very direct support for checking specific DOM elements as seen by the browsing client. However, sometimes the expected result of a request is plain text (or csv, json, etc). Is there…
Rasmus Kaj
  • 4,224
  • 1
  • 20
  • 23
5
votes
2 answers

VS2010 Web Load Testing with User Logins

I am looking to create a Web Performance test that can be bound to a CSV file with usernames and passwords so that I can run concurrent tests with different users. How do I modify a recorded WebTest in order to accomplish this?
Micah
  • 10,295
  • 13
  • 66
  • 95
5
votes
1 answer

Upload a file through a microsoft webtest

I have a .webtest that I am intending to use to load test uploading a file to a website. I am using the webtest framework that is built into visual studio with the intention of running my larger scale tests from azure. I created a new webtest and…
Logan
  • 195
  • 8
5
votes
1 answer

How do I use pylons (paste) webtest with multiple checkboxes with the same name?

Suppose I have a form like this:
Favorite colors? Green Blue Red …
GDorn
  • 8,511
  • 6
  • 38
  • 37
5
votes
2 answers

I'm lost with trying to write tests to my Flask application

So I've tried writing some tests for my Flask application for a couple of days but I can't get it to run. The tests pass but it gets stuck on PASSED. I've cloned cookiecutter-flask (cookiecutter-flask) and it runs webtest together with pytest (I…
jwanglof
  • 548
  • 1
  • 5
  • 20
5
votes
3 answers

Canoo WebFunctionalTest / Selenium, features comparison

For features comparison of Web Canoo Web Functional Test and Selenium software, it would be good have an assessment, in terms of integration to Java platform applications, speed, how quick is it to deploy Tests, execute, and analyze results,…
Tatyana Solovyeva
  • 231
  • 1
  • 5
  • 8
5
votes
2 answers

Can I add non existing field to form with WebTest?

I am testing a form using WebTest. However, somes fields are created dynamically using JS, and thus these fields are not in the Form. I have an error when I try to set one of these fields: >>> resp.form['new_field'] = 'value' or >>>…
Gagaro
  • 752
  • 7
  • 17
5
votes
1 answer

How important it is to measure the page render/load time in web application

When we test for the Performance of an Web Application what generally people concentrate on ?. Is it the http response time ?. Or is it the time page takes to load/render completely on client browser once after it receives the response from the…
4
votes
1 answer

mimic 'Enter' Key press in Webtest using Selenium

I want to mimic Enter being pressed in Webtest. I am using Selenium 2.3.1. I want to do it using WebDriver. I know that we can do this using Selenium RC, but I do not want to do it that way. Has anybody done this before? I am open to upgrade to…
Mitesh
  • 378
  • 1
  • 6
  • 19
1
2
3
17 18