testing

Objective-C – Having a TestFlight configuration to include TestFlight SDK

主宰稳场 提交于 2019-12-21 20:14:10
问题 I've followed the instructions from TestFlight to duplicate the "release" configuration. Also I'm using TestFlight SDK to get live reports from my app. By doing this I had to include some TestFlight code in my application. Of course I don't want to have this code in my release version of my app. Is there some way to only include this code in the testflight configuration (the duplicated release configuration)? The same way you can do with #ifdef DEBUG for the debug configuration (or do I have

How to Set up PHP Test Server in Dreamweaver?

可紊 提交于 2019-12-21 19:51:37
问题 I am trying to setup a PHP server so that I could use the "Live" feature in Dreamweaver, in addition to being able to preview in my browser without having to upload the .php file via an FTP application every time, which is not efficient when I want to do quick small previews. I have setup a new website and selected a folder for the site on my local drive. For the server, I have the following information (I don't know how much of it is relevant): Remote: Yes Test: Yes Server Name: Server

Having tests in multiple files

吃可爱长大的小学妹 提交于 2019-12-21 18:31:23
问题 I am using pyramids framework for large project and I find it messy to have all my tests in one tests.py file. So I have decided to create directory that would contain files with my tests. Problem is, I have no idea, how to tell pyramids, to run my tests from this directory. I am running the tests using python setup.py test -q . But this of course do not work, after I have moved my tests into tests directory. What to do, to make it work? 回答1: First, you need to make sure tests is not just a

Protractor - find element in iframe

徘徊边缘 提交于 2019-12-21 18:04:10
问题 in very top of my page I have call of iframe: <iframe ng-if="webpadUrl" id="webPadIframe" ng-src="http://Path/To/iFrame?sessionId=9bc9989441c8c9cfb9ff5bdc381a72ea" seamless="seamless" class="fullscreen ng-scope" src="http://Path/To/iFrame?sessionId=9bc9989441c8c9cfb9ff5bdc381a72ea"> </iframe> Inside of iframe I have something like: <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 5845 3897"> and below that multiple <g> with different ID and so on.. <g id="30_0_80" transform=

Django: block internet connection for testing purposes

风流意气都作罢 提交于 2019-12-21 17:36:18
问题 I'd like to make sure my unit tests do not try to connect to Internet, is there a way to raise an exception when they do? There was a similar question Python: block network connections for testing purposes?, but the solution proposed there blocks all socket connections, including the database ones, which is not acceptable for Django tests. 回答1: Found out a way to do this. You can paste this into your settings. if 'test' in sys.argv: # Block Internet access during tests import urllib2 import

Capybara visit method is not working

核能气质少年 提交于 2019-12-21 17:34:59
问题 I'm not sure what's going on, but I can't get simple tests to work because Capybara's visit method is not working for me. I've been trying to finish this railscast on testing. Once I get to the point where Capybara needs to visit the login page the test fails because it's only able to visit my root_url. Here's what the failure looks like. Note that it's failing because it can't even visit the login page. It's getting stuck on the homepage: Running: spec/requests/password_resets_spec.rb

Setting timeout to Qt Test

跟風遠走 提交于 2019-12-21 16:59:03
问题 I'm using Qt Test, for write unit tests for some computing heavy algorithms. The process uses a considerable amount of time, and when is run in a older computer, the process fails because a timeout like this: ********* Start testing of KnotTest ********* Config: Using QtTest library 5.6.2, Qt 5.6.2 (i386-little_endian-ilp32 shared (dynamic) release build; by MSVC 2013) PASS : MyTest::initTestCase() QFATAL : MyTest::test_benchmark() Test function timed out FAIL! : MyTest::test_benchmark()

How do I mock a Class with Ruby?

我的未来我决定 提交于 2019-12-21 15:09:45
问题 I'm using minitest/mock and would like to mock a class. I'm not trying to test the model class itself, but rather trying to test that a service (SomeService) interacts with the model (SomeModel). I came up with this (Hack::ClassDelegate), but I'm not convinced it's a good idea: require 'minitest/autorun' require 'minitest/mock' module Hack class ClassDelegate def self.set_delegate(delegate); @@delegate = delegate; end def self.method_missing(sym, *args, &block) @@delegate.method_missing(sym,

what are some common problems with Hibernate/persistence?

人走茶凉 提交于 2019-12-21 13:03:46
问题 I have an application I'd like to test-proof against possible problems related to Hibernate and/or persistence. What other problems? How do I reproduce them (literally)? And how do you recover from them? To make it clear: I'm talking about multi-threaded cluster environment (the most complex one). My one: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) Reproduce: Load the object. UPDATE using HQL. Try to

Testing with protractor using ui-select

柔情痞子 提交于 2019-12-21 13:01:49
问题 I am trying to test an ui-select with protractor. In this ui-select I have a list of countries. My html looks like: <ui-select ng-model="datiAnagrafici.countryOfBirth" name="countryOfBirth" theme="bootstrap" reset-search-input="true" append-to-body="true" required blur> <ui-select-match placeholder="paese di nascita">{{$select.selected.name}}</ui-select-match> <ui-select-choices repeat="country.code as country in countries | filter: {name:$select.search}"> <span ng-bind-html="country.name"><