acceptance-testing

When to choose system test over integration test Rails 5.1?

北城以北 提交于 2019-12-20 17:36:26
问题 With the release of Rails 5.1, they included system tests. Which means we can test our JavaScript too in Rails. I see Rails guide explains a sample test creating article in both ways: via system test and via integration test. Now the question is: before Rails 5.1 I was writing complex test cases in integration tests. But now I have two options to write a test case. I can write test case like test: should create article in integration test, but I can also write the same test case in system

mock $httpBackend in angular e2e tests

依然范特西╮ 提交于 2019-12-18 12:30:02
问题 Does anyone have an idea how to mock $httpBackend in angular e2e tests? The idea is stubbing XHR requests while running tests on travis-ci. I'm using karma to proxy assets and partials from my rails app running on travis. I want to do acceptance testing without real DB queries. Here is part of my karma config file: ... files = [ MOCHA, MOCHA_ADAPTER, 'spec/javascripts/support/angular-scenario.js', ANGULAR_SCENARIO_ADAPTER, 'spec/javascripts/support/angular-mocks.js', 'spec/javascripts/e2e/**/

Can it be considered bad practice to rely on automated tests running in order?

烂漫一生 提交于 2019-12-13 17:36:43
问题 In my acceptance test suites specifically I see a lot of tests designed to run in a particular order (top to bottom) which in some ways makes sense for testing a particular flow, but I've also heard this is bad practice. Can anyone shed some light on the advantages and drawbacks here? 回答1: In majority situations if you rely on the order, there is something wrong. It's better to fix this because: Tests should be independent to be able to run them separately (you should be able to run just 1

How to fill CKeditor textarea with content using codeception

拈花ヽ惹草 提交于 2019-12-13 08:36:02
问题 This is a follow up question to this one -- How to fill a rich text editor field for a Codeception Acceptance test The solution given on this post, works perfectly on CKeditor version 4.3.2 Standard as seen on this site CKeditor instance but unfortunately does not work on my site's own CKeditor which is version 4.5.10. Issue with my site's CKeditor - Webdriver throws an error that the name attribute of the textarea is not found. On the example, working CKeitor this is not an issue, I am able

Codeception ignores CURLOPT_TIMEOUT

穿精又带淫゛_ 提交于 2019-12-13 01:19:31
问题 This is the content of the acceptance.suite.yml class_name: AcceptanceTester modules: enabled: - PhpBrowser: url: http://reoc.lo/ curl: CURLOPT_TIMEOUT: 50000 # timeout in seconds - \Helper\Acceptance I did this following this question: How to change codeception phpbrowser/mink timeout but it doesn't work for me as it skips this setting and it's timing out on 30 seconds which is the default. Are there any other settings to override default CURLOPT_TIMEOUT? 回答1: Alright, now to answer your

How to test a feature that depends on date events happen?

↘锁芯ラ 提交于 2019-12-13 00:11:40
问题 How can we make an acceptance/integration test on a feature that depends on date something happens? For simplicity, let's assume this feature: we monitor a folder, and add items to a ListView corresponding to the received file. The colour of the listview item will depend on the date it is received. Say, if it's received on sunday, the colour is red, monday, it's blue, etc. How can we make an test code on this feature without needing a week to run? Should the test code modify system date (But

How to efficiently test accessing a large file with Behat/Mink?

戏子无情 提交于 2019-12-12 20:44:55
问题 I'd like to write Behat/Mink scenarios to check whether certain user accounts can download a large file. I can use the When I follow "largefile.zip" event, but that appears to download the entire file. Rather than wasting time and resources streaming the large file, I'd like to (for example) just check the result of an HTTP HEAD request, or just try to start downloading the file with an HTTP GET request and then cancel it immediately and check the response status code . How can I do that with

load fixture data for acceptance tests - Codeception

感情迁移 提交于 2019-12-12 04:08:43
问题 Hope Everyone is doing great. I have a problem. I need to get my fixtures loaded in db before running acceptance test in codception in my Yii2 Application. here is teh detail for it. Target : Load fixtures in database so that I can run acceptance tests on them. Problem : Despite of my a at most efforts, I am still I am unable to achieve this affect Here is the data that I got to share with you: common\modules\myCustomModule\tests\acceptance\models\DashboardCest ``` class ResumeDashboardCest {

Fitnesse Maven Classpath error

喜欢而已 提交于 2019-12-11 14:49:15
问题 I am trying to set up Fitnesse on my current project. pom.xml configuration has: <!-- https://mvnrepository.com/artifact/org.fitnesse/fitnesse --> <dependency> <groupId>org.fitnesse</groupId> <artifactId>fitnesse</artifactId> <version>20161106</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.fitnesse.plugins</groupId> <artifactId>maven-classpath-plugin</artifactId> <version>1.9</version> <scope>runtime</scope> </dependency> <plugins> <plugin> <artifactId>maven-antrun

Selenium with Webdriver - Switch to child window without name

♀尐吖头ヾ 提交于 2019-12-11 14:13:27
问题 I'm performing acceptance testing with webdriver and codeception. I'm a bit new to it, so please bear with me. I am trying to switch to a child window that is generated after clicking a button: <input class="submit_btn" type="button" onclick="openHAWin(this.form.purchase_clinic.value)" value="add" name="add_ha"> As there is no name for this page embedded in the code, nor on the target page itself, I attempted to use the following recommended code to switch to the child page: $I-