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
1
vote
2 answers

Parsing dependent requests in an http web response

I want to simulate the behaviour of the WebTestRequest class (in Visual Studio's Test Tools framework) where it can invoke dependent requests based on resources that are referred to in the response that is obtained from the original request. For…
Tola Odejayi
  • 3,019
  • 9
  • 31
  • 46
1
vote
1 answer

Error using web test performance visual studio 2012

I am using visual studio 2012 ultimate top create web performance tests. I have created a test, manually, and i'm trying to get a value, through a web test plugin, from the App.config file in the solution. Code in App.config: (xml…
1
vote
1 answer

Alternative to VSTS 2008 WEb tests to test JavaScript & Ajax

I've read repeatedly how VSTS 2008 Web testing can only test the post and post back between web pages and thus cannot test calling Java Script or Ajax. Is there an alternative so that I can test if my dynamically filled controls (javascript) and…
Shaun
  • 11
  • 1
1
vote
1 answer

Writing doctests for pyramid web app which depend on settings in ini file

I would like to write doctests for my pyramid web app, using the webtest module. I tried it like this: from my_webapp import main from webtest import TestApp app = TestApp(main({})) result = app.get('/') This raises a KeyError (because some.url is…
Achim
  • 15,415
  • 15
  • 80
  • 144
1
vote
1 answer

Load testing Web Service using webtest

I have a webtest with makes a simple call to a WebService which looks like that: MyWebService webService = new MyWebService(); webService.Timeout = 180000; webService.myMethod(); I am not using ThinkTimes, also the Run Duration is set to 5…
Carlos
  • 143
  • 2
  • 8
1
vote
1 answer

.NET WebTest Custom ValidationRules - How to unit test?

I'm creating custom ValidationRules for a .NET webtest. Is there some easy way to create unit tests for these validation rules?
scoob
  • 1,369
  • 1
  • 17
  • 29
1
vote
1 answer

WebTesting using VSTS 2008

I've been trying to create and execute webtests for one of my websites using VSTS 2008 SP1. The problem is that during playback VSTS does not play back the javascript. How can i solve this and where can I find comprehensive information on…
Storm
  • 4,307
  • 11
  • 40
  • 57
1
vote
1 answer

How to simulate a user with certain permissions using WebTest

I'm testing my views and would like to simulate logged in user with certain permissions. I know that in django-webtest I can simulate logged in user like this: self.app.get(reverse('profile'), user='bob') Can i also pass in a group for this user?…
Neara
  • 3,693
  • 7
  • 29
  • 40
1
vote
1 answer

Enum in custom web test validation rule

I'm building a Web Test using Microsoft VS2010. I used the explanation on MSDN: How to: Create a Custom Validation Rule for a Web Performance Test. In the example there using string and int as private members with public "get" and "set" those…
Roee Gavirel
  • 18,955
  • 12
  • 67
  • 94
1
vote
1 answer

How to bind extracted parameters in WebTest VS2010

I am using VS2010 WebTest to inovoke a list of WCF operations in sequence. First call is to obtain a session token from the server. This token has to be passed as request element to all subsequent calls. I have extracted this token and stored this…
Abhijeet
  • 13,562
  • 26
  • 94
  • 175
1
vote
1 answer

Programmatically shutdown application before webtest

How can I shutdown web application before each webtest?
Jan Remunda
  • 7,840
  • 8
  • 51
  • 60
1
vote
3 answers

References on how to create webtests for ASP.NET

I've been working for a while with .net unit testing and stuff. Now I need to create tests for ascx and ascx.cs pages (but it aspx and aspx.cs references might also help). I'm not very familiar with webtests. Can anyone give hints or references that…
Samuel Carrijo
  • 17,449
  • 12
  • 49
  • 59
1
vote
1 answer

Stopping a webtest if an extraction rule failed

I need to stop a web test from running if an extraction rule fails. The Extract method of the extraction rule class looks like this: public override void Extract(object sender, ExtractionEventArgs e) { try { // fancy logic going on…
Paul
  • 1,224
  • 2
  • 14
  • 31
1
vote
1 answer

ITestCaseResult.Iterations.Count returns 0 for a test with iterations

I have a couple of simple web tests that use data sources. Each web test contains only one request. After they run it's pretty hard to detect why they failed, given that they are quite a few (80) and each has a number of rows that varies between 1…
Paul
  • 1,224
  • 2
  • 14
  • 31
1
vote
0 answers

Open an url failed, error message: The interface is unknown. (Exception from HRESULT: 0x800706B5)Interop.SHDocVw

I'm doing web test with WatiN and Nunit, when i try to open an url and log on. the following error interrupt me: ADP.OneHR.ATC.Production_SmokingTests.Production_LoginAndOpenOnePageTests.BeginTest(2): System.Exception : Failed to write log! The…
Lina
  • 41
  • 1
  • 6