testing

Windows Mobile device incompatibilities - need suggestions for how to approach testing

北战南征 提交于 2019-12-25 04:30:36
问题 I have a user who runs my application on a Samsung BlackJack with WM 6.1. He reports issues, like labels not appearing on forms, that I cannot reproduce on any of the emulators or the device that I am developing with (T-Mobile Shadow and WM 6.0). What are my options to reproduce and identify issues like that, without getting any offending device myself and trying it out? 回答1: screen sizes are different. The resolutions may also be different. Microsoft has emulators for square pdas and vga

File upload in Intern.js

怎甘沉沦 提交于 2019-12-25 04:28:27
问题 It is written in documentation that it is possible to do things like file upload using intern. Can anyone provide an example of how this can be done? I searched through examples and through LeadFoot documentation and I can't find anything. Thanks. 回答1: You interact with a file input form field, just like an end-user would, with the exception that you simply “type” the absolute path to the file you want to upload from the test machine. return this.remote.findById('fileInput').type('/path/to

front end development: web browsers differences when using browserstack

为君一笑 提交于 2019-12-25 04:26:38
问题 Scope: only front end issues (HTML, CSS, javascript) browsers/devices: desktop browsers (IE8+, Chrome, Firefox & Safari), ipad's browser (mobile Safari), mobile devices browsers (android, mobile safari) I have experienced unexpected differences between a page rendered in IE8 locally (IE8 installed on a physical machine) & the same page rendered in IE8 in Browserstack. This concerns the CSS properties filter and -ms-filter , more details on the comment of this answer: Cross browser rgba

What to call test cases that are test integration with third-party services?

心已入冬 提交于 2019-12-25 04:25:19
问题 I have test cases, which make requests to real, not mocked, third-party services and verify that functions that handle responses are doing it correctly. I can't call them "functional", because they test only small pieces of code, that responsible to communication with third-party services. And I can't call them "unit" - because they hit real external services. What is correct name for them? 回答1: Those are called integration tests. Basically you have three types of tests: Unit tests, no

How to test a custom module running node-fluent-ffmpeg (an async module)?

泄露秘密 提交于 2019-12-25 04:24:09
问题 How do I test a custom module which is simply running a node-fluent-ffmpeg command with Mocha&Chai? // segment_splicer.js var config = require('./../config'); var utilities = require('./../utilities'); var ffmpeg = require('fluent-ffmpeg'); module.exports = { splice: function(raw_ad_time, crop) { if (!raw_ad_time || !crop) throw new Error("!!!!!!!!!! Missing argument"); console.log("@@@@@ LAST SEGMENT IS BEING SPLITTED."); var segment_time = utilities.ten_seconds(raw_ad_time); var last

Spock: How to use test data with @Stepwise

我与影子孤独终老i 提交于 2019-12-25 04:21:04
问题 I used @Stepwise for automation. 8 test methods are running sequentially to complete the process. One of the methods take parameter and I want to pass different parameters to the method. But the problem is: The method takes first set of parameter, then parameters are processed AND instead of proceeding to the next method, the method takes next set of parameter. The source looks like: @Stepwise class AOSearchPageTest extends GebReportingSpec { def "first_method"() { } def "second_method"() {

How to Test a Play Application that extends a custom trait

99封情书 提交于 2019-12-25 04:11:25
问题 I'm having trouble writing tests for a mixin to my Play application that runs in it's own thread separate from play. I've tried over-writing WithApplication.provideApplication method with no luck. I get an inheriting conflicting methods error. (one from the real app "MyRunnableSystemWrapper", one from my mocked fake mixin called "MyMockedSystemWrapper"). execute(system) runs my system that is tested elsewhere and has sideaffects (connects to networked services, thus failing this test when

Trouble on evaluating other model data

纵饮孤独 提交于 2019-12-25 04:06:20
问题 I am using Ruby on Rails 3.0.9 and RSpec 2. In my spec file I have code like the following: describe User do let(:authorizations) { Authorization.all.map(&:name) } it "should have a 'registered' value" do authorizations.should include("registered") end end When I run the above test I get: User should have a 'registered' value Failure/Error: authorizations.should include("registered") expected [] to include "registered" Diff: @@ -1,2 +1,2 @@ -registered +[] Is it possible to solve the above

Insert values in class without explicit writing them

一个人想着一个人 提交于 2019-12-25 03:22:12
问题 I have some huge classes and don't want to write them all out for testing, because it's a huge effort and I could forget some values what makes the test invalid. Messages = new List<Request.Notif.NotifRuleMessages> { new Request.Notif.NotifRuleMessages { Code = 1234, Message = new List<Request.Notif.NotifRuleMessagesMessage> { new Request.Notif.NotifMessagesMessage { Status = new Request.Notif.NotifMessagesMessageStatus { Code = 1, Bool = true, Test1 = "Test", Test2 = "Test" }, Rules = new

Nightwatch.js cannot set a string variable to an input field?

痞子三分冷 提交于 2019-12-25 03:08:56
问题 I am testing some JavaScript code with Nightwatch.js. I want to read a value from an input tag, increase or decrease it by 1 and then write it back to the input tag. Therefore I wrote this code: .getValue('#inputConfigReading', function(result){ val = parseInt(result.value); if (val % 2 == 0) val++; else val--; val = val+''; }) .clearValue('#inputConfigReading') .setValue('#inputConfigReading', val) I checked it out. The variable val has the correct value after the command val = val+''; . But