testing

Export instruments trace data via command-line for leaks

谁说我不能喝 提交于 2020-01-04 13:12:43
问题 I am using the following script to run leaks instruments from the command-line. instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Leaks.tracetemplate <app path> after executing the command, i get instrumentscli0.trace file. How can i get readable data about leaks from that file. Is there any way to export the results to a text file via any command. In automation template we can specify an output folder using the switch -e UIARESULTSPATH

How to add Facebook Credits to test user

喜夏-厌秋 提交于 2020-01-04 11:18:22
问题 I created a Facebook test user for my Lovers Facebook application, and I'm using this user to test the Facebook Credits API. But, when I click the link to make an order, I am presented with a Facebook Dialog titled, "Buy Red Rose" I'm asked for my credit card info because the test user doesn't have enough credits. How do I add Facebook credits to a test user 回答1: Found it. No need to create a test user. You can just add your user id in the text field labeled Credits Test Users on the Credits

Testing Rails module without loading ActiveRecord

孤者浪人 提交于 2020-01-04 11:10:08
问题 I'm working on a Rails app which I am testing with RSpec. After a lot of waiting for tests to finish, I've followed Gary Bernhardt's advice and this informative post by Paul Annesley and setup a tiered spec_helper where I only load what parts of Rails I absolutely need, to keep test times down, and extract functionality into separate modules which I test in isolation. This is working up to a point. The problem is that I have a module (extending ActiveSupport::Concern ) with instance and class

Get access to Angular service instance from JavaScript code

江枫思渺然 提交于 2020-01-04 09:30:12
问题 What I'm trying to do is have some testing assertions based on the data in the Angular service, i.e. we're trying to create E2E tests and the tool we're using allows us to execute arbitrary JavaScript code for assertions, so for that I need to know if it's possible to get access to the Angular service instance. How can I get access to an Angular service instance from plain JS code? That is, if my Angular app is deployed, and I open the app in the browser, then open Chrome DevTools, can I get

Ruby TypeError: no implicit conversion of String into Array

*爱你&永不变心* 提交于 2020-01-04 09:19:12
问题 I have a test that returns TypeError: no impliciit conversion of String into Array , when it hits a certain section of my code. If I run the code outside of rspec it runs just fine, so I'm not sure why this is happening. require 'spec_helper' require 'digital_ocean_size_list' describe Chef::Knife::DigitalOceanSizeList do subject { Chef::Knife::DigitalOceanSizeList.new } let(:access_token) { 'FAKE_ACCESS_TOKEN' } before :each do Chef::Knife::DigitalOceanSizeList.load_deps Chef::Config['knife']

Perform specialised functionality on failure of a Scalatest

守給你的承諾、 提交于 2020-01-04 09:15:34
问题 I am using selenium to perform integration tests on a Scala web app. I would like to either screenshot or print the html of a page into the console whenever a test fails. My current set up is Scalatest using Selenium 2.0, with Spec. Is there anyway to intercept a failure or determine the state of a test from a AfterEach override method? 回答1: To do that you'll want to override withFixture instead of using BeforeAndAfterEach. BeforeAndAfterEach's beforeEach method happens before the test, and

Web UI Test Automation

百般思念 提交于 2020-01-04 09:06:14
问题 I'm looking at the tools (Test Telerik WebUI Studio, Visual Studio 2010 Test Professional) to automate testing web applications written in NET. Do you use such tools? If so, what tools are you using and what experience do you have with this type of testing. Particularly I am interested in issues of maintenance of such tests (for example, if you change layouts.) 回答1: Disclaimer: I work for Telerik; I'm just sharing the relevant resources for the WebUI Test Studio Regarding the WebUI Test

Web UI Test Automation

自作多情 提交于 2020-01-04 09:05:10
问题 I'm looking at the tools (Test Telerik WebUI Studio, Visual Studio 2010 Test Professional) to automate testing web applications written in NET. Do you use such tools? If so, what tools are you using and what experience do you have with this type of testing. Particularly I am interested in issues of maintenance of such tests (for example, if you change layouts.) 回答1: Disclaimer: I work for Telerik; I'm just sharing the relevant resources for the WebUI Test Studio Regarding the WebUI Test

“Catch” unit testing framework - REQUIRE_THROWS_AS

这一生的挚爱 提交于 2020-01-04 07:52:43
问题 I started to use "Catch" unit testing framework and so far it's really great. I have used VS built in unit testing framwork with great pain . one thing I have noticed that the macro REQUIRE_THROWS_AS does not behave as one would expect from the docs: REQUIRE_THROWS_AS( expression, exception type ) and CHECK_THROWS_AS( expression, exception type ) Expects that an exception of the specified type is thrown during evaluation of the expression. when I try to write TEST_CASE("some test") { SECTION(

Apple Pay On Web - Sandbox Testing

无人久伴 提交于 2020-01-04 07:00:30
问题 I have following the steps described in this link to perform a sandbox testing. But I was failed to use the sandbox tester that I have created in iTunesConnect. When I tried to login using the tester account in App Store on an iPhone, it prompts the following error. I have verified the apple ID but it still failed. How to resolve it? By the way, is it possible to add a test card to a real apple ID for testing? 回答1: The Apple Pay Sandbox account is not for signing into iTunes, but to iCloud.