webtest

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

白昼怎懂夜的黑 提交于 2019-12-11 05:52:53
问题 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 and 150. Therefore, I used the TFS SDK to access the results programmatically, after publishing the test results to a build in TFS. Here is the relevant part of the code: foreach (var testRun in testRuns) { Console.WriteLine(string.Format("{0}",

Anyone using webtest without ant?

三世轮回 提交于 2019-12-10 22:47:23
问题 I'd like to try using WebTest, preferably from Clojure, but I can only find its functionality exposed as Ant tasks. There seems to be some sort of Groovy interface, which implies that it's possible to use from any JVM language outside of Ant, but I can't figure it out. I'm hoping to use WebTest as a "scriptable browser" to load up someone else's page and see if it does various unpleasant things, rather than test my own page with every build, so Ant doesn't really seem like an appropriate

Upload a file through a microsoft webtest

老子叫甜甜 提交于 2019-12-10 14:16:18
问题 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 recorded the steps, including the file upload. This all recorded correctly, but the problem is that the File Upload Parameter was just recorded the filename (not the bytes). This means that the test needs to have access to the file that will be

Unit Test configuration for ASP.NET application

人走茶凉 提交于 2019-12-10 10:08:13
问题 This is my first test for Asp.Net Web Application. We have an Engine consisting of several modules. I need to test classes in Engine Module. Though these clases are part of Asp.Net App, they consists of only business logic. How can I test these classes in isolation other being part of WebApp ? because i am getting this error The Web request 'http://localhost:8936/' completed successfully without running the test. This can occur when configuring the Web application for testing fails (an ASP

Symfony / Doctrine UnitTests with SQLite memory DB

拟墨画扇 提交于 2019-12-09 11:36:13
问题 I'm still working on PHP unit tests for testing my symfony2 controllers. My test classes are derivations of WebTestCase and the tests are doing GET or POST requests do check if everything works fine. I want to test all underlying layers, but I don't want to mess up my database with the tests. I don't want to use mock ups, but an in-memory SQLite db, where I can set up a test scenario to check all modifications. I found a lot of hints how to do this with doctrine 1.x, but they don't work any

Enum in custom web test validation rule

∥☆過路亽.° 提交于 2019-12-08 10:02:44
问题 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 parameters valid for edit in the UI when I add this validation rule to my test. I want to have an Enum with 3 option that when I add the validation rule to the UI I can choose from. Is there a way to add an Enum variable which will also be valid in the

Pyramid fails to start when webtest and sqlalchemy are used together

我的梦境 提交于 2019-12-08 04:24:20
问题 I am trying to setup a pyramid app to use both webtest and sqlalchemy. If I comment out the SQLAlchemy code, the webtests run without a problem. [Test log ] https://travis-ci.org/caffeinated-expert/frisbee/builds/91622436 Error Traceback (most recent call last): File "frisbee/frisbee/tests/test_cities_page.py", line 18, in setUp app = main({}) File "frisbee/frisbee/__init__.py", line 15, in main engine = engine_from_config(settings, 'sqlalchemy.') File "build/bdist.macosx-10.10-x86_64/egg

Unit Test configuration for ASP.NET application

给你一囗甜甜゛ 提交于 2019-12-05 18:56:18
This is my first test for Asp.Net Web Application. We have an Engine consisting of several modules. I need to test classes in Engine Module. Though these clases are part of Asp.Net App, they consists of only business logic. How can I test these classes in isolation other being part of WebApp ? because i am getting this error The Web request ' http://localhost:8936/ ' completed successfully without running the test. This can occur when configuring the Web application for testing fails (an ASP.NET server error occurs when processing the request), or when no ASP.NET page is executed (the URL may

Disabling @login_required while unit-testing flask with flask-login

送分小仙女□ 提交于 2019-12-04 20:31:53
问题 I am unit testing my flask app which uses the flask-login extension. I am setting up all my tests like this using webtest: class TestCase(unittest.TestCase): def setUp(self): app.config['TESTING'] = True self.client = webtest.TestApp(app) But when I try to visit urls through self.client.get() which are decorated with @login_required, I get a 401 error with a message that I am not authorized to access the url. According to the documentation https://flask-login.readthedocs.org/en/latest/

Insert 120 second wait in Visual studio Webtest

旧巷老猫 提交于 2019-12-04 05:50:51
问题 I want to add a delay of 120 second between the execution of two web requests. I have tried using think time but it won't pause the execution for 120 sec. Can anyone please let me know how to add wait to pause the execution for 120 second (after say 2 web request execution) and then proceed the execution for next request. I am using visual studio 2015. 回答1: Think times are processed after the response is received. So to have a delay between two requests set the think time on the first request