functional-testing

CasperJS, parallel browsing WITH the testing framework

十年热恋 提交于 2020-03-13 07:39:45
问题 Question : I would like to know if it's possible to do parallel browsing with the testing framework in one script file , so with the tester module and casperjs test command. I've seen some people create two casper instances : CasperJS simultaneous requests and https://groups.google.com/forum/#!topic/casperjs/Scx4Cjqp7hE , but as said in the doc, we can't create new casper instance in a test script. So i tried doing something similar-simple example- with a casper testing script (just copy and

CasperJS, parallel browsing WITH the testing framework

Deadly 提交于 2020-03-13 07:39:07
问题 Question : I would like to know if it's possible to do parallel browsing with the testing framework in one script file , so with the tester module and casperjs test command. I've seen some people create two casper instances : CasperJS simultaneous requests and https://groups.google.com/forum/#!topic/casperjs/Scx4Cjqp7hE , but as said in the doc, we can't create new casper instance in a test script. So i tried doing something similar-simple example- with a casper testing script (just copy and

EarlGrey - How do I check if multiple objects are being shown on the screen

无人久伴 提交于 2020-02-03 10:42:47
问题 The EarlGrey documentation says that You must narrow down the selection until it can uniquely identify a single UI element I have three UIViews on my UI that I need to check the visibility of using the grey_sufficientlyVisible() assertion. However, unless if I literally pick each one up using their individual accessibility labels or so, I cannot match all of them. Is there a way to match a super-set of views or should I create individual test conditions for each of the views? 回答1: By saying

EarlGrey - How do I check if multiple objects are being shown on the screen

Deadly 提交于 2020-02-03 10:42:22
问题 The EarlGrey documentation says that You must narrow down the selection until it can uniquely identify a single UI element I have three UIViews on my UI that I need to check the visibility of using the grey_sufficientlyVisible() assertion. However, unless if I literally pick each one up using their individual accessibility labels or so, I cannot match all of them. Is there a way to match a super-set of views or should I create individual test conditions for each of the views? 回答1: By saying

How to check if an element is not clickable with Protractor?

≡放荡痞女 提交于 2020-02-03 04:18:18
问题 It's trivial to test if an element is clickable with Protractor, but I'm stuck scratching my head trying to figure out how to check if an element is not clickable. I've attempted to wrap the click function in a try/catch so that when an error is thrown when trying to click it should catch it and let the test pass; however, this does not work. Here is my code for the method that does the check: return this.shouldSeeDisabledFunds() .then(function() { var clickable = true; try { fundsElem.first(

Symfony2 functional test to select checkboxes

天大地大妈咪最大 提交于 2020-01-29 06:29:18
问题 I'm having trouble writing a Symfony 2 functional test to set checkboxes that are part of an array (i.e. a multiple and expanded select widget) In the documentation the example is $form['registration[interests]']->select(array('symfony', 'cookies')); But it doesn't show what html that will work with and it doesn't work with mine. Here is a cutdown version of my form <form class="proxy" action="/proxy/13/update" method="post" > <input type="checkbox" id="niwa_pictbundle_proxytype

Symfony2 functional test to select checkboxes

喜夏-厌秋 提交于 2020-01-29 06:28:10
问题 I'm having trouble writing a Symfony 2 functional test to set checkboxes that are part of an array (i.e. a multiple and expanded select widget) In the documentation the example is $form['registration[interests]']->select(array('symfony', 'cookies')); But it doesn't show what html that will work with and it doesn't work with mine. Here is a cutdown version of my form <form class="proxy" action="/proxy/13/update" method="post" > <input type="checkbox" id="niwa_pictbundle_proxytype

Devise warden error thrown for authenticate_user in functional Rails test

旧巷老猫 提交于 2020-01-20 03:32:29
问题 I have a resource where the new action requires a user to be logged in to view. If a user tries to create a new resource without being logged in, they are redirected (302'd) to the login page. My functional test looks like this: test "should not get new unless logged in" do get :new assert_response :redirect end The stacktrace looks something like this: ArgumentError: uncaught throw :warden /.../gems/warden-1.1.1/lib/warden/proxy.rb:114:in `throw' /.../gems/ruby-1.9.2-p318/gems/warden-1.1.1

Set TestNG test name, as seen on the HTML report, dynamically from the DataProvider input?

浪子不回头ぞ 提交于 2020-01-16 04:31:04
问题 I tried following instructions on this thread but they fail to work for me. Basically I need to figure out how to set the TestNG test name, as seen on the HTML report, dynamically from the DataProvider input. I created a GitHub project that re-creates the problem I am experiencing and I am hoping someone can help me solve it ? I created a CustomReport class that reveals the "test name" on the HTML report but the test name is not yet shown correctly. To solve this, all I need is to modify the

TFS - order of automata tests to execute

孤者浪人 提交于 2020-01-05 07:41:26
问题 Supposing I have system tests: A and B, where A includes a record to a database, B tries to modify it. When A fails, B will fail as well. A and B are written as "unit tests" (test methods), A and B are tests cases in TFS as well, automated, linked to these "unit tests". I put them on a test plan, test suite, both of them. I want to execute them with the "Run Functional Tests" step. How can I tell TFS to execute them in the right order? What is the best practice to develop tests like these?