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

Webtest for binary content, how to?

Assume a web page that returns binary content: http://localhost/website/Default.aspx?FileId=value and we have some files with known Ids and checksums (i.e. MD5). How it's possible to extract whole response and calculate it's check-sum via some…
Xaqron
  • 29,931
  • 42
  • 140
  • 205
1
vote
2 answers

ValueError in tests permission in django

I want to test permissions in my application. I want to give my user permissions and see if they are there. I get this error: ValueError: invalid literal for int() with base 10: 'myapp.can_view' CODE class PermissionsTest(WebTest): def…
mark
  • 653
  • 1
  • 10
  • 23
1
vote
1 answer

single web test for 3 diff roles

I have created a web test in vs2010. which browse through the products. I have 3 roles in my site guest (non logged in ), logged in not verified, logged in verified. How I can use single test for all 3 roles?
Sharique
  • 4,199
  • 6
  • 36
  • 54
1
vote
1 answer

How to Run Selenium code in webtest?

I am new to webtest and I read that it is possible to record script in selenium and then run it via webtest/fitnesse. I have got webtest and selenium installed and configured. Is there specific format of code that suites webtest? Any help regarding…
Chanakya
  • 865
  • 2
  • 9
  • 22
1
vote
1 answer

Should I be relying on WebTests for data validation?

I have a suite of web tests created for a web service. I use it for testing a particular input method that updates a SQL Database. The web service doesn't have a way to retrieve the data, that's not its purpose, only to update it. I have a…
Alexander Kahoun
  • 2,458
  • 24
  • 36
1
vote
2 answers

SharePoint Visual Studio document upload Web Test fails with Connot close stream until all bytes are written

I have created a Visual Studio 2008 sp1 test suite web test that uploads a document to a document library in SharePoint. The test is a lot like the one described here. All is fine until the test is converted to a coded web test. Then the upload post…
Nat
  • 14,175
  • 5
  • 41
  • 64
1
vote
2 answers

Prevent Visual Studio Web Test from changing request details

I have a service that accepts Xmla queries for Analysis services, often times those queries themselves will have a string that contains a fragment that looks something like {{[Time].[Year].[All]}} Recording these requests works fine but when I try…
keithwarren7
  • 14,094
  • 8
  • 53
  • 74
1
vote
0 answers

How to test with webtest and multiprocessing in GAE

Please tell me how to solve a following problem.I would like to use webtest with multiprocess but it fails. It means that I would like to use parallel tests with db.I'm not paticular about multiprocess. Probably,because of using other process,It can…
prk2
  • 147
  • 2
  • 9
1
vote
1 answer

Visual Studio web tests: Can a coded webtest be run through the Web Test Editor run view?

Full disclosure, I'm new to Visual Studio Web Tests and coding for them. I've written a webtest; coded in VB; it runs great. Our QA engineer wants to use this script for performance testing; but he wants the nice GUI that comes when you build a…
Frank Rosario
  • 2,512
  • 5
  • 31
  • 47
1
vote
2 answers

Custom extraction rule in VS2008 doesn't work

I'm creating a Web Test in VS2008 and have extended ExtractionRule. Now when I run test where my extraction rule used it displays "Request failed: Could not load type 'TypeName, version, locale etc'. This happens even though I added my class in…
Sergej Andrejev
  • 9,091
  • 11
  • 71
  • 108
1
vote
1 answer

Watin from TeamCity not running as a Windows Service

I'm trying to run Watin from within a TeamCity build, using nUnit. All tests run fine locally. I know you cannot run the full Watin tests (i.e. POST) from TeamCity if it is running as a Windows Service. You must start the build agent from a .bat…
peter.swallow
  • 905
  • 14
  • 38
1
vote
3 answers

Fiddler recorded content-length vs WebTest result page bytes

I am new in visual studio 2008 Web test. I tried to record to fiddler my web site which deployed in IIS 6.0 and GZIP compression is enabled. I saved the session generated by fiddler to .webtest file extension. I attached the webtest file to vs 2008…
Jeff
  • 11
  • 2
1
vote
0 answers

java.lang.LinkageError trying to set up Canoo WebTest using Groovy in IntelliJ

Okay, so I'm trying to set up a Canoo WebTest using Groovy in Intellij. As a simple start I used the example the give on their website, namely import com.canoo.webtest.WebtestCase class SimpleTest extends WebtestCase { void testWebtestOnGoogle()…
user3260875
  • 11
  • 1
  • 3
1
vote
1 answer

Webbench fork error

I wanna use webbench to test my website, I use mac. When I did webbench -c 50 -t 30 http://XXXX It works well But when I did webbench -c 5000 -t 30 http://XXXX It reported error like this: problems forking worker no. 98 fork failed.: Operation…
CSnerd
  • 2,129
  • 8
  • 22
  • 45
1
vote
1 answer

'No module named webtest' error in Google App Engine after pip install webtest

I am getting this error, when I try to run gaeunit on my development server with webtest. No module named webtest Status: 404 Not Found Content-Type: text/html; charset=utf-8 Cache-Control: no-cache Content-Length: 23 No module named webtest I…
andygimma
  • 315
  • 1
  • 3
  • 7