testing

Cannot run ./gradlew connectedInstrumentTest

情到浓时终转凉″ 提交于 2019-12-24 01:53:48
问题 I set up a basic instrument test in Android Studio in my src/androidTest/java folder. Now I want to run this test and everywhere I get the information to call ./gradlew connectedInstrumentTest on my OS X terminal. But that results in an error "Task 'connectedInstrumentTest' not found in project". If I look at ./gradlew tasks the instrument task is not listed. Do I have to set anything else up in my project/build.gradle? No tutorial or docu tells me to do so, so I'm a bit confused. Has anyone

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

时光总嘲笑我的痴心妄想 提交于 2019-12-24 01:49:16
问题 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 configured the load test to do so. However, there is a complication. The session key is injected into the URL, like this: http://ProductName/(S(ilv3lp2yhbqdyr2tbcj5mout))/System/Container.aspx I converted the Visual Studio WebTests to coded tests, and

How can I get my ServiceStack Tests to authenticate using RestSharp?

不想你离开。 提交于 2019-12-24 01:44:06
问题 I've got a working implementation of CustomCredentialsAuth implemented in my ServiceStack app. I can hit the URL with auth credentials, and it works as expected. In my tests however, I'm not having the same luck. I'm using RestSharp, and if I disable [Authenticate] , I can get all of my tests to pass. Enabling [Authenticate] and running the tests give me Expected: OK But was: Unauthorized Here is my test. How can I get RestSharp to authenticate for my tests? using System; using System.Net;

How to know App navigating to HomeActivity or LoginActivity - Appium

雨燕双飞 提交于 2019-12-24 01:43:22
问题 I am testing my mobile app using Appium . When app starting it directly navigation to HomeActivity sometimes(if user already logged in). If user not logged in then opening LoginActivity . So, how can I know which activity starting? so that I can execute logout code accordingly. This code not executing at all because app navigation to HomeActivity directly instead of LoginActivity . public void DemoTest() { AndroidElement editElement1 = driver.FindElementById("input_name"); editElement1.Clear(

How to know App navigating to HomeActivity or LoginActivity - Appium

拥有回忆 提交于 2019-12-24 01:43:08
问题 I am testing my mobile app using Appium . When app starting it directly navigation to HomeActivity sometimes(if user already logged in). If user not logged in then opening LoginActivity . So, how can I know which activity starting? so that I can execute logout code accordingly. This code not executing at all because app navigation to HomeActivity directly instead of LoginActivity . public void DemoTest() { AndroidElement editElement1 = driver.FindElementById("input_name"); editElement1.Clear(

Build on TFS wants to copy a executable from Node.js test project

断了今生、忘了曾经 提交于 2019-12-24 01:38:23
问题 I created a Node.js project for an protractor test environment using the Node.js Tools to test a web application on a team foundation server. Locally i can create the test project and run it with the debugger. However, the build on the TFS does not work. Log: "<PATH>\TestProject.Web.Protractor.Tests.njsproj" (13) on node 2 (default targets). 13>PrepareForBuild: Creating directory "obj\Debug\". CoreCompile: Creating directory "bin". Copying file from "C:\Program Files (x86)\MSBuild\Microsoft

Selenium IDE - script execution time in output

有些话、适合烂在心里 提交于 2019-12-24 01:18:28
问题 Do you know how to check the script execution time in Selenium IDE? What kind of command or option I should use? Thanks in advance! 回答1: I was wondering the same thing, and this is what I came up with. storeEval | new Date().getTime() | startTime // The rest of your code here storeEval | new Date().getTime() | endTime storeEval | (${endTime} - ${startTime}) / 1000 | scriptExecutionTime echo | ${scriptExecutionTime} seconds | 来源: https://stackoverflow.com/questions/15000648/selenium-ide-script

Mocking class constructor default parameters in Python

柔情痞子 提交于 2019-12-24 01:18:09
问题 Is there a way to mock just the default parameters of a class constructor? For example, if I have this class: class A (object): def __init__(self, details='example'): self.details = details Is there a way to a mock just the default value of the details argument, eg to details='test' ? 回答1: Surely this is simplest: class TestA (A): def __init__(self, details='test'): super(TestA, self).__init__(details) If you're not able to use TestA without changing code elsewhere, then you could try

What are integration tests containing and how to set them up

主宰稳场 提交于 2019-12-24 01:16:28
问题 I’m currently learning about unit tests and integration testing and as I understood it, unit tests are used to test the logic of a specific class and integration tests are used to check the cooperation of multiple classes and libraries. But is it only used to test multiple classes and if they work together as expected, or is it also valid to access databases in an integration test? If so, what if the connection can‘t be established because of a server sided error, wouldn’t the tests fail,

Got Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout

纵然是瞬间 提交于 2019-12-24 01:15:36
问题 I have problem with api-testing with jest What is the current behavior? Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout. at ../../../../Users/chhoeurng.sakona/AppData/Roaming/npm/node_modules/jest-cli/node_modules/jest-jasmine2/build/queue_runner.js:68:21 My current code it ('GET should return a status of 200 OK', function (done) { frisby .get('url-api') .expect('status', 200) .done(done); }); What is the current behavior? It should work