testing

Cannot run tests on Xcode 6 Beta 5

坚强是说给别人听的谎言 提交于 2020-01-12 07:14:10
问题 I have an iOS project that is using the Kiwi testing framework (latest version 2.3.0 which I installed from cocoapods). At first when I ran the tests I received an error that it cannot find XCTest.h. So I followed the advice on this answer: https://stackoverflow.com/a/24651704/1082326 and the problem went away. However a different problem arise, now when I try to run the tests when the simulator selected is "iPhone 5 (8.0)" then I get the following error: IDEBundleInjection.c: Error 3587

MATLAB testing framework

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-12 06:48:09
问题 I am using MATLAB R2008a, what testing framework is available and what is recommended. the need for comprehensive from having to refactor a 5 kloc matlab application to Matlab oop. 回答1: There are several listed on the c2 wiki. xUnit and mlunit_2008a seem to be the most highly regarded. 回答2: You can try MATLAB xUnit, which you can download from the MATLAB Central File Exchange. 回答3: Note: current versions of Matlab (2013a and later) have integrated xUnit directly into Matlab. http://www

Rails: How to raise I18n translation is missing exceptions in the testing environment

我怕爱的太早我们不能终老 提交于 2020-01-12 06:31:36
问题 I want Rails to raise an exception when an I18n translation is missing in the testing environment (instead of rendering text 'translation missing'). Is there a simple way to achieve this? 回答1: To raise exceptions, you can define a class to handle localization errors. class TestExceptionLocalizationHandler def call(exception, locale, key, options) raise exception.to_exception end end Then you attach it to the desired test cases with I18n.exception_handler = TestExceptionLocalizationHandler.new

Rails: How to raise I18n translation is missing exceptions in the testing environment

烂漫一生 提交于 2020-01-12 06:31:25
问题 I want Rails to raise an exception when an I18n translation is missing in the testing environment (instead of rendering text 'translation missing'). Is there a simple way to achieve this? 回答1: To raise exceptions, you can define a class to handle localization errors. class TestExceptionLocalizationHandler def call(exception, locale, key, options) raise exception.to_exception end end Then you attach it to the desired test cases with I18n.exception_handler = TestExceptionLocalizationHandler.new

“autotest/rails […] doesn't […] exist. Aborting”

梦想的初衷 提交于 2020-01-12 03:25:08
问题 I'm finding that autotest has stopped working... $ autotest loading autotest/rails Autotest style autotest/rails doesn't seem to exist. Aborting. According to this blog post, the common reason for this error is that people don't have the autotest-rails gem installed. However, I definitely have that installed: autotest-rails (4.1.0) ZenTest (4.1.4, 4.1.3, 4.1.1, 4.0.0, 3.11.1, 3.11.0, 3.10.0, 3.9.3, 3.9.2) I haven't installed any new gems today or yesterday, though I might have done a gem

How to add a pause between 2 requests in POSTMAN

别说谁变了你拦得住时间么 提交于 2020-01-12 02:53:30
问题 I have a collection of requests in POSTMAN. I wanted to add a pause between 2 requests but I couldn't find a way to do so from reading their docs. Any idea? UPDATE I only wanted to put a pause after one request instead of after every request in the collection. 回答1: In case someone is still looking for this - You can add delay after/before 1 of many test in a collection you can use: setTimeout(function(){}, [number]); where 'number' is the milliseconds. If it's added at 'Tests' it will be

How do you put a file in a fixture in Django?

前提是你 提交于 2020-01-11 19:51:29
问题 I can easily fill the field of a FileField or ImageField in a Django fixture with a file name, but that file doesn't exist and when I try to test my application it fails because that file doesn't exist. How do I correctly populate a FileField or Imagefield in a Django fixture so that the file itself is available too? 回答1: I'm afraid the short answer is that you can't do this using the FileField or ImageField classes; they just store a file path and have no real concept of the file's actual

Automatic Testing for Cordova/Phonegap Webview on Android

坚强是说给别人听的谎言 提交于 2020-01-11 18:32:47
问题 I'm currently looking for a solution to test Android Apps automatically, native Android apps as well as hybrid Cordova/Phonegap apps. The UI Automator from Google looks pretty fine, but can not deal with WebViews, which makes it unusable for me. Then I found the promising automation framework Appium based on Selenium, which should also be able to deal with hybrid apps, but I couldn't get it to work with WebViews, it seems to not be implemented fully yet, as also several posts prove. After

Coverage analysis for Functional Tests

北城余情 提交于 2020-01-11 17:39:29
问题 In the project that I am working on, we have functional tests written over Selenium. The application undergoes functional changes with each feature release. Is there a tool / mechanism that we can keep track of the gaps in automated functional tests, so that at least the manual testers can keep an eye for these areas? Note: we are not doing FTDD, so the functional test coverage can be quite poor, even though we ensure high unit test coverage. We use NCover to check unit test coverage. 回答1:

Philisophical Questions about Test-Driven Development

喜欢而已 提交于 2020-01-11 17:10:50
问题 I have been perpetually intrigued by test-driven development, but I can never follow through with it when I try it on real projects. I have a couple of philosophical questions that continually arise when I try it: How do you handle large changes? When it comes to testing single functions (some parameters, a result value, few side effects), TDD is a no-brainer. But what about when you need to thoroughly overhaul something large, e.g. switching from a SAX parsing library to a DOM parsing