testing

CodedUi :How to go about for search property of window when its title name keeps changing?

南笙酒味 提交于 2020-01-05 08:41:46
问题 I am trying to automate a click on control within window, and depending on what is selected within window, the tile of the window changes.Like sometime it is "abc",second time it will be "123".There is no common string in window title for two scenarios When I recorded the coded ui test, it assumed the title as "abc". Now I want to customize the test somehow, so that any title will work. How can I do so? Any help will be great. 回答1: You can change the searchProperties in runtime, like this:

ember integration test error. dealing with asynchronous side-effects

放肆的年华 提交于 2020-01-05 07:51:00
问题 I'm trying ember's integration testing package (http://emberjs.com/guides/testing/integration/) but I am getting this error Assertion Failed: You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in an Ember.run I've made a JSBin to reproduce this error: http://jsbin.com/InONiLe/9, which we can see by opening up the browser's console. I believe what's causing this error is the line data.set('isLoaded', true); in

ember integration test error. dealing with asynchronous side-effects

岁酱吖の 提交于 2020-01-05 07:49:54
问题 I'm trying ember's integration testing package (http://emberjs.com/guides/testing/integration/) but I am getting this error Assertion Failed: You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchronous side-effects in an Ember.run I've made a JSBin to reproduce this error: http://jsbin.com/InONiLe/9, which we can see by opening up the browser's console. I believe what's causing this error is the line data.set('isLoaded', true); in

Sandbox User Login - Invalid Address

大城市里の小女人 提交于 2020-01-05 06:45:28
问题 Basically I was trying to purchase subscription with developer mode certificates using Sandbox account details. Up to now I have used around 100 times same Sandbox user details and it was worked perfectly. But from last 2 to 3 days its not get able to success in making purchase. At the end of purchase, I was getting following kind of dialog box then after no success in purchase. Still application was not live in market so I can't use real apple account for making purchase so I was using

Is it possible to see what the response headers were after a page load using Watin

放肆的年华 提交于 2020-01-05 05:37:29
问题 Part of our testing is to check that a page is being returned in the correct format (specifically gzip) Does WATIN expose the HTTP response headers so they can be inspected? 回答1: No, WatiN doesn't expose the HTTP response headers neither Internet Explorer. It's not possible to get them using InternetExplorer interface or any of it's events. 来源: https://stackoverflow.com/questions/3758426/is-it-possible-to-see-what-the-response-headers-were-after-a-page-load-using-wat

rails rspec - (2nd test) Expected response to be a <:redirect>, but was <200>

谁说我不能喝 提交于 2020-01-05 05:30:06
问题 Expected response to be a <:redirect>, but was <200> My tests has: describe "Link POST #create" do context "with valid attributes" do it "creates a new link" do expect{ post :create, link: FactoryGirl.create(:link, :group => @group) }.to change(Link,:count).by(1) end it "redirects to the new link" do post :create, link: FactoryGirl.create(:link, :group => @group) # response.should redirect_to @link # Link.unscoped.last response.should redirect_to Link.unscoped.last # render_template :show end

How can I run FEST Swing tests in Jenkins?

让人想犯罪 __ 提交于 2020-01-05 05:23:08
问题 I'm trying to run FEST Swing tests on Jenkins as a service on Windows 7. I have already allowed the service to interect with the desktop with the necessary permission to do so. It was no use, though. Most of what I found on the internet either shows how to do it on Linux (through the CLI shell) or how to run it on the prompt, which is not what I'm looking for. I have also found some vague discussions on how to run the tests letting the desktop available (which was by running it on a VM). But

How to get coverage for Jest toThrow without failing test

試著忘記壹切 提交于 2020-01-05 05:09:09
问题 Let's say I'm testing the below React component with jest --coverage : class MyComponent extends React.Component { constructor(props) { super(props) if (props.invalid) { throw new Error('invalid') } } } the coverage report will say that the line throw new Error('invalid') is uncovered. Since .not.toThrow() doesn't seem to cover anything I create the below test with Enzyme: const wrapper = shallow( <MyComponent invalid /> ) it('should throw', () => { function fn() { if (wrapper.instance()

Jest `toMatchSnapshot` causes “Maximum call stack size exceeded”

 ̄綄美尐妖づ 提交于 2020-01-05 05:01:34
问题 I am trying to test a snapshot on a component and I get the error RangeError: Maximum call stack size exceeded , though when I remove toMatchSnapshot , the error is gone. This has happened to me with multiple components, here is one example. My project was created with Create React App and uses Jest + Enzyme Stack call FAIL src/components/Dashboard/Pipeline/Pipeline.test.js ● Pipeline Component › Pipeline Item › should render RangeError: Maximum call stack size exceeded at Object.it (src

Mongoid not playing nicely with factories

你离开我真会死。 提交于 2020-01-05 04:57:17
问题 Moingoid doesn't seem to be setting embedded relationships persistently during my tests. In my user model I have: def vote_on(bill, value) if my_groups = self.groups my_groups.each do |g| bill.votes.create(:value => value, :user_id => self.id, :group_id => g.id) # result only with factories: bill.votes.first.group = nil # and bill.votes.first.user = nil !! # self.id and g.id have good values during the test, they just aren't persisting end else raise "no groups for this user" # #{self.full