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
2
votes
1 answer

Using Visual Studio Team Services (VSTS) to run web/load testing with SSL error

I have a contractor who created and uploaded test to VSTS but now when we run them we get: The request was aborted. Could not create SSL/TLS secure channel. Screen cap of errors How is this fixed? I am new to VSTS.
cdub
  • 24,555
  • 57
  • 174
  • 303
2
votes
1 answer

WebTest not appearing in Fiddler save menu

I am trying to save a fiddler output to a .webtest format. I used to select file/save as but now I cannot see the .webtest option. Could anyone tell me why this might have dissappeared from the Fiddler save menu? Thanks.
superlatch
  • 21
  • 1
2
votes
2 answers

how to get the response body in code webtest?

I wrote a webtest that calls a web-service. I want to get the response body and do some validation on it. public override IEnumerator GetRequestEnumerator() { WebTestRequest request2 = new…
NMKP
  • 789
  • 3
  • 11
  • 33
2
votes
1 answer

how to test memory usage in a symfony webtestcase

I would simply like to trace the whole amount of memory used for a request I test by means of a WebTestCase's method. Something like this inside a WebTestCase::testReturnValidUser method: $client = static::createClient(); …
Bertuz
  • 2,390
  • 3
  • 25
  • 50
2
votes
1 answer

Error handling webtests containing file upload

We've web application developed using MVC2. I am recording webtests for all views in our web app. I'm using VS2008 test edition installed on separate machine for these webtests. My problem is - my recorded webtests fail for a view. THis particular…
Jaqen H'ghar
  • 1,839
  • 7
  • 37
  • 66
2
votes
1 answer

Finding multiple radio buttons of the same name in Django webtest

I'm writing some web tests with the Django webtest where I'm trying to set one radio button in a pair of radio buttons to be checked. Naturally, they both have the same name attribute value. Using pdb, and assuming I have a form variable whose type…
basicallydan
  • 2,134
  • 3
  • 25
  • 40
2
votes
1 answer

Escaping the Context Parameter format in a Visual Studio Web Test

I am trying to work out how to pass a particular piece of data in a POST via a Visual Studio Web Test, without it being recognized and treated as a Context Parameter. The POST contains a (string) body that is a json document. Part of the body…
Brendan Green
  • 11,676
  • 5
  • 44
  • 76
2
votes
2 answers

Running webtests without Microsoft Visual Studio Testing edition/Team Suite

Is there any way I can run Microsoft webtest not having Microsoft Visual Studio Testing edition/Team Suite? Any third-party tool or a way to run it through command line? I have MS VS Professional Edition 2008 installed. Thanks!
Michael Sagalovich
  • 2,539
  • 19
  • 26
2
votes
1 answer

Visual Studio WebTestRequest

I need some help with WebTestRequest on visual studio I have 2 requests that the 2nd request need some data from the 1st request response how do i use the specific data that i need from the 1st response to the 2nd request ? (in my case its…
abovebeyond15
  • 105
  • 1
  • 9
2
votes
1 answer

AppError: Bad response: 404 Not Found (not 200 OK

I have faced the below error while testing an API. AppError: Bad response: 404 Not Found (not 200 OK or 3xx redirect for http://localhost/_ah/spi/AdminAuthentication.authenticate) '{"state": "APPLICATION_ERROR", "error_message": "No user with the…
Avinash Raj
  • 172,303
  • 28
  • 230
  • 274
2
votes
0 answers

Webtest with Selenium - together? Possible? How?

While reading through WebTest documentation, I found a somehow cryptic note about webtest.http.StopableWSGIServer: StopableWSGIServer is a WSGIServer which run in a separated thread. This allow to use tools like casperjs or selenium. I know, what…
dotz
  • 884
  • 1
  • 8
  • 17
2
votes
1 answer

VSTS Web test recorder(12.0) buttons are not enabled in IE11

Am facing a problem with Web-Test Recorder window i.e I have ensure that the web test recorder plugin is enabled under manage add on. Am using VSTS 2013 Ultimate and IE11 . When I click on the recorder button , the IE window pop up with the Web…
2
votes
1 answer

django-webtest: How to test remember-me login/expire-on-browser-close cookies?

How do you test login-remember-me functionality with webtest-django? In other words, how do you use webtest to test things that involve expire-on-browser-exit cookies? I have the below draft, but it's not working. It seems that the server must be…
aliteralmind
  • 19,847
  • 17
  • 77
  • 108
2
votes
2 answers

Visual Studio Web Testing - Are there any good books/videos available?

I am trying to find a good resource on web and load testing. I'm using Visual Studio 2010 ultimate and, while i'm sure it is too early for much material to be released, i'm hoping there are some good resources for Visual Studio 2008 that are still…
JP.
  • 5,536
  • 7
  • 58
  • 100
2
votes
0 answers

Python webtest multipart form set request payload

I'd like to get webtest to run a multipart form post using Mock. The issue I have is the request payload is missing. Here's my request using webtest: res = app.post( my_url, upload_files=files ) Pyramid's DummyRequest boundary =…
aug2uag
  • 3,379
  • 3
  • 32
  • 53