testing

Is the ID generated by JSF guaranteed to be the same across different versions and implementations?

给你一囗甜甜゛ 提交于 2019-12-23 12:34:39
问题 We are about to write a full set of tests for one of our JSF applications using Selenium. So far, it seems that there are two preferred approaches to uniquely identify each element: by ID or using a unique class name. The later is really a hack and doesn't make sense semantically. The former is the right approach, but the element IDs are generated by JSF. All the different JSF implementations I've seen seem to be using the same approach: use the parent element as the namespace and then

How can I run integration tests after building all modules in a multi-module Maven project?

一世执手 提交于 2019-12-23 12:24:21
问题 I am working on a large multi-module Maven project. Each module has fast unit tests (using the Surefire plugin), many modules have slow integration tests (using the Failsafe plugin). I would like to speed up the feedback for "simple" build failures (compilation errors and unit test failures) by running integration tests from all modules after all modules have been built and unit-tested. Can you suggest a good way of achieving this? 回答1: running integration tests from all modules after all

How to choose the test DB cakePHP testing

梦想的初衷 提交于 2019-12-23 12:22:51
问题 I am using the cake bake command to create my fixture and Test models. I have done it successfully with one of my models but i am having troubles with another one. I dont know why, it tries to work with the default DB instead with the test one that i have already defined and that is the one used by the first model i tested. Both Test models, the one which works well and this 2nd one which doesn't, have been created with cake bake and they look exactly the same. Both of them have this in their

Mocking expectations in Kiwi (iOS) for a delegate

偶尔善良 提交于 2019-12-23 12:18:42
问题 Short version of the question: What is wrong with the following Kiwi/iOS mock expectation? [[mockDelegate should] receive:@selector(connectionDidSucceedWithText:andStatus:) withArguments:[testString1 stringByAppendingString:testString2],theValue(value),nil]; Long version of question: I am trying to write a test in Kiwi, iOS for a simple class that handles a NSConnection. To test that the class handles the callback from the NSConnection I send it the delegate methods NSConnection normally does

Merging @Sql from superclass with @Sql in subclass

安稳与你 提交于 2019-12-23 12:17:53
问题 I have an abstract class annotated with @Sql(executionPhase = ExecutionPhase.BEFORE_TEST_METHOD, scripts="someScript") . I have a test class which inherits from the abstract class. The child class is also annotated with @Sql(executionPhase = ExecutionPhase.BEFORE_TEST_METHOD, scripts="someOtherScript") . When I was running spring boot 1.2, everything worked as I expected it to: scripts from parent class were run before child class. I upgraded to spring boot 1.3 and now, the child class's @Sql

Are scenario tests groups of sequential unit tests?

最后都变了- 提交于 2019-12-23 12:11:28
问题 I read the Wikipedia article on scenario testing, but I am sad to say it is very short. I am left wondering: are scenario tests a collection of sequential unit tests? Or, perhaps, like a single multi-step unit test? Do many frameworks support scenario tests, or are they covered by unit testing? If they have nothing to do with automation, what are they? 回答1: I don't think there's any fixed relationship between the number and distribution of tests and scenario tests. I think the most common

Protractor sendkeys not working: an x display is required for keycode conversions

北城以北 提交于 2019-12-23 11:53:44
问题 I am trying to run Protractor e2e tests inside a Vagrant VM using headless Chrome. I managed to get it working by using Xvfb but when I run a test to fill a form I get an error: unknown error: an X display is required for keycode conversions, consider using Xvfb All tests run fine but as soon as I use getKeys() (e.g. element(by.model('user.email')).sendKeys('admin'); ) I get this error, even though I am already using Xvfb. I'm running: AngularJS sample app generated with the Yeoman angular

MSBuild targets to run all tests, even if some fail

廉价感情. 提交于 2019-12-23 11:47:48
问题 I have an MSBuild script that runs NUnit unit tests, using the console runner. There are multiple tests projects and I'd like to keep them as separate MSBuild targets, if possible. If the tests fail I want to overall build to fail. However, I want to continue running all the tests, even if some of them fail. If I set ContinueOnError="true" then the build succeeds regardless of test outcomes. If I leave it at false then the build stops after the first test project that fails. 回答1: One way to

MSBuild targets to run all tests, even if some fail

无人久伴 提交于 2019-12-23 11:47:03
问题 I have an MSBuild script that runs NUnit unit tests, using the console runner. There are multiple tests projects and I'd like to keep them as separate MSBuild targets, if possible. If the tests fail I want to overall build to fail. However, I want to continue running all the tests, even if some of them fail. If I set ContinueOnError="true" then the build succeeds regardless of test outcomes. If I leave it at false then the build stops after the first test project that fails. 回答1: One way to

How to simulate database failure for test purposes (in Ruby on Rails)

ぐ巨炮叔叔 提交于 2019-12-23 11:39:28
问题 It is a common setup to survise an application with a heartbeat message by some monitoring tool, for example Monit. If the application is running and everything is working correctly, it returns an "I am alive" message, if the database fails or the web server hangs it returns nothing or an internal server error (HTTP status code 500) page. How can you simulate a database failure to test this behavior in Ruby on Rails? It would be nice if one could enable/disable this feature for test purposes