testing

Visual Studio Test won't run over a network share

五迷三道 提交于 2019-12-23 02:14:26
问题 When I try to run my test suite, which works fine under Visual Studio 2008, I get the following error in the Output window: Error loading J:\VBProjects2010\Libraries\PFTest\PFTest\bin\Debug\PFTest.dll: Could not load file or assembly 'file:///J:\VBProjects2010\Libraries\PFTest\PFTest\bin\Debug\PFTest.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) Note that these same tests can be viewed in the Test View windows, and run well under Visual

Visual Studio Test won't run over a network share

依然范特西╮ 提交于 2019-12-23 02:14:16
问题 When I try to run my test suite, which works fine under Visual Studio 2008, I get the following error in the Output window: Error loading J:\VBProjects2010\Libraries\PFTest\PFTest\bin\Debug\PFTest.dll: Could not load file or assembly 'file:///J:\VBProjects2010\Libraries\PFTest\PFTest\bin\Debug\PFTest.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) Note that these same tests can be viewed in the Test View windows, and run well under Visual

QUnit asyncTest does not continue after error

南笙酒味 提交于 2019-12-23 02:14:07
问题 How can I tell QUnit to consider errors during asyncTest as test failures and continue to next test? here is an example which QUnit stops running after a ReferenceError : jsfiddle 回答1: Errors in asynchronous tests die silently if they arise while QUnit isn't officially running. The simplest solution is to wrap every asyncTest contents in a try/catch block that propagates any errors after restarting QUnit. We don't actually have to pollute the code with a million try/catches--we can decorate

How to make `sbt test` to run tests in main project and all subprojects (or some selected set)

大兔子大兔子 提交于 2019-12-23 02:00:11
问题 I have a main project and a few subprojects. When I want to run tests, currently I have to do sbt test and sbt subProjectName/test . Is there any way of making sbt run all tests or for example all tests in the main project and one of the subprojects. I am using Build.scala configurations, but can't find a way of setting this. Thanks! 回答1: Therefore sbt supports aggregate . for in depth details read: http://www.scala-sbt.org/0.13.5/docs/Getting-Started/Multi-Project.html#aggregation In given

Appium, Android - Finding element inside another element

泄露秘密 提交于 2019-12-23 01:53:31
问题 I am trying to check if element exist, but appium seems to ignore searching an element when we specified that it should be inside another element. For example: driver.findElementByAccessibilityId("First element").findElementByAccessibilityId("Second element"); It should work somehow since there is option in Appium inspector called Locator where after selecting strategy and choosing search from selected element option it finds what I expect. What is the proper way of finding such elements ?

Geb & Spock - If/Then/Else logic - How to check for a record and do one thing if it exists but continue on if it doesn't

蓝咒 提交于 2019-12-23 01:42:03
问题 I'm testing the creation and then removal of a record on my site using Geb/Spock. However I can't create the record if it already exists and so I check for the existence of the record and remove it if it exists in the beginning of the test. The problem occurs when the record does not exist, causing the test to fail. Is there a way to incorporate some if/then/else logic so the test will continue if it does not find the record in the beginning and remove it if it does find it? Edit for example

save_and_open_page has stopped serving up my css

人走茶凉 提交于 2019-12-23 01:12:45
问题 My testing setup was working very nicely serving up pages correctly formatted with css whenever I called save_and_open_page from within a test. I then set up some javascript tests and made a few changes to my setup (sorry I can't detail them all - I haven't documented things well enough). After making changes I now get unformatted html in the browser when I call save_and_open_page . Here's my spec/spec_helper.rb require 'rubygems' require 'spork' Spork.prefork do ENV["RAILS_ENV"] ||= 'test'

mocking server for SSR react app e2e tests with cypress.io

巧了我就是萌 提交于 2019-12-23 01:04:20
问题 I'm building a single page web application (SPA) with server side rendering (SSR). We have a node backend API which is called both from the node server during SSR and from the browser after initial rendering. I want to write e2e tests that configures API responses (like with nock ) and work both with browser calls and SSR server calls. some pseudo-code : it('loads some page (SSR mode)', () => { mockAPI.response('/some-path', {text: "some text"}); // here i configure the mock server response

Grails Controller Unit Test doesn't render page to response.text

匆匆过客 提交于 2019-12-23 00:49:51
问题 My env configs: Java 1.7u51, Grails 2.3.7 I'm trying to assert response.text in Controller Test but it always brings "". What's happening? This is my UserController class UserController { def index() { flash.errors = "$params.secret" render view: "index", model: [model: params.toModel, text: params.username] } } This is /user/index.gsp file ${text} This is my Specification @TestFor(UserController) class UserControllerSpec extends Specification { def setup() { } def cleanup() { } void "test

How to check bluetooth connection state with paired device in Android

人盡茶涼 提交于 2019-12-23 00:48:19
问题 I develop an bluetooth app which will connect to a paired device and send a message, but I have to test connection before. I've tried many options, but nothing works in good way. So could you send me any example of code which can do it? I made an thread, but I can't get an good state of connection to build an "if" function. Here is the code: package com.example.szukacz; import java.lang.reflect.Method; import java.util.Set; import android.app.Activity; import android.bluetooth