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

Insert wait in VS2008 web test

How can I insert time wait value in web test in Visual Studio 2008 test edition? I have recorded a web test that I want to use in Load test. Now I need to put some time delay between pages in web test. Thanks a lot.
eomeroff
  • 9,599
  • 30
  • 97
  • 138
2
votes
2 answers

TFS webtest for SSRS reports issue

I am creating webtests in TFS and trying to test reports execution in SSRS. When I record the initial process, it includes Reserved.ReportViewerWebControl.axd files. These files are what is causing the problem. When I remove the files, the report…
Dustin Laine
  • 37,935
  • 10
  • 86
  • 125
2
votes
1 answer

My cookies are not being transmitted when using webtest.TestApp

I am confused as to how to pass cookies in a request using python webtest. I have the following test: def test_commenting_and_voting(self): https = {'wsgi.url_scheme': 'https'} users = [] for user in USERS: resp_post =…
Stephen Cagle
  • 14,124
  • 16
  • 55
  • 86
2
votes
2 answers

Canoo Webtest + jquery 1.10.2 hangs

Has someone found a way to use Canoo Webtest on sites using jQuery 1.10.2? Apparently the underlying htmlunit engine hangs in the browser testing section of jQuery... Any hint appreciated. Here's the error I get: ERROR…
Samuel
  • 2,106
  • 1
  • 17
  • 27
2
votes
0 answers

Test a logout scenario in Google App Engine and webtest

I'm having a hard time making this simple test work: class TestNotlogedUser(unittest.TestCase): def setUp(self): unittest.TestCase.setUp(self) self.testapp = webtest.TestApp(application) self.testbed = testbed.Testbed() …
loki
  • 2,271
  • 5
  • 32
  • 46
2
votes
1 answer

Dynamically building a URL in QTP

I've been taking a quick look at QTP with one of our test team. We've figured out some basics like recording a test, capturing text using output values, putting in check points, etc. However, I can't figure out how to do the following... We have a…
A_M
  • 7,693
  • 6
  • 33
  • 37
2
votes
0 answers

Projects that demonstrate django-webtest?

Can anyone recommend any Django projects that demonstrate how to use the django-webtest package effectively? The documentation for django-webtest (and WebTest as well) is pretty light on real-world examples. Thanks.
Jim
  • 13,430
  • 26
  • 104
  • 155
2
votes
0 answers

SignalR Persistent Connection in a coded Webtest

I have the following code in a console app: var connection = new Connection("http://localhost/xxx/signalr"); connection.Error += ex => { string msg = string.Format("***SignalR Error: {0}", ex.ToString()); …
pexxxy
  • 489
  • 1
  • 6
  • 17
2
votes
1 answer

django-webtest, user authentication and view decorators

I'm using django-webtest (v1.5.6) to test a decorator is limiting access to a view to authenticated users. My view is simply: @active_account_required def homepage(request): return render(request, 'accounts/account_homepage.html', { …
edkay
  • 181
  • 1
  • 8
2
votes
1 answer

WebTests in VS2012 not running

We use VS Ultimate for web tests and load tests, but since moving to VS 2012 from VS 2010, the web tests don't seem to run anymore. We used to be able to do ctrl-r ctrl-t to debug specific tests, but that doesn't work anymore. I then found out about…
Zipper
  • 7,034
  • 8
  • 49
  • 66
2
votes
1 answer

Testing cherrypy WSGI application using Webtest and or nose?

How to test a cherrypy application with json or html result widely with nose and webtest using WSGI interface? any example will be appreciated.
pylover
  • 7,670
  • 8
  • 51
  • 73
2
votes
1 answer

Is it possible to persist WebTestContext across ASP.NET load test session?

I want to load test an enterprise Web application (which I did not build), using a Visual Studio 2010 Ultimate Load Test. I want each virtual user to log in at the beginning, and log out at the end of their run of random tests. I can properly…
Mike Christian
  • 1,526
  • 1
  • 15
  • 27
1
vote
0 answers

Visual Studio 11 Web Test with different paths

I'm trying to create a Web test in Visual Studio 11 beta. The problem is that the app can randomly serve different pages to the user (something like an A/B test). That is user journey can be pages: A > B > C > D > E or : A > F > G > H > D >…
1
vote
1 answer

Using the VS Web Test Classes outside Visual Studio

I use HttpWebRequests pretty extensively - I've found that the Visual Studio Web Test classes (i.e. WebTestRequest and WebTestResponse etc) offer a lot of really nice methods that i'd love to start using. But I can't seem to find a way to use…
will
  • 3,975
  • 6
  • 33
  • 48
1
vote
1 answer

Creating webtest extraction rule for mvc sites querystring

Can anyone tell me how to create an extraction rule that will allow me to pull an ID from an MVC querystring? Scenario: User hits site, and clicks "Add new" Request: www.site.com/item/create Response: www.site.com/item/view/2143 The site will…
4imble
  • 13,979
  • 15
  • 70
  • 125