integration-testing

Grails unit or integration tests?

不打扰是莪最后的温柔 提交于 2019-12-10 21:02:53
问题 I don't know whether to use unit or integration tests for what I am wanting to test in my Grails 2.2.3 application. I want to run some tests against like this: @TestFor(Student) @Mock(Student) class StudentTests { void testFoundStudent() { def s = Student.findById(myId) assert s != null assert s.firstName = 'Grant' assert s.lastName = 'McConnaughey' } } This is going to require the use of our test database, so would that make it an integration test? When I run this code as a unit test it

Maven failsafe plugin fails with “Unable to locate surefire-booter”

怎甘沉沦 提交于 2019-12-10 19:09:41
问题 Our Maven build is suddenly failing in Jenkins as of August 2nd. We cannot explain why maven failsafe cannot access it's dependent "booter" plugin. Has anyone seen the same thing? [INFO] [failsafe:integration-test {execution: run-integration-tests}] [INFO] Failsafe report directory: /var/lib/jenkins/workspace/Foo/integration-tests/target/failsafe-reports [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ---------------------------------

Rails: Capybara can't log in user with Devise fixture data

梦想与她 提交于 2019-12-10 18:51:58
问题 I'm writing integration tests for my app, and am trying to sign in the user using Capybara. When I create a User object in the test itself and enter that user's details, it passes and the user is logged in. But when I try signing in using a fixture's details, the user never gets logged in. As can be seen in test.log , a 401 error is being returned: Started POST "/users/sign_in" for 127.0.0.1 at 2015-10-14 18:54:21 +0000 Processing by Devise::SessionsController#create as HTML Parameters: {

How can I switch between two test suites in Maven 2?

半腔热情 提交于 2019-12-10 15:48:59
问题 We're using the maven-surefire-plugin to run our Java tests. The tests fall into two categories: Fast tests Slow tests The whole "fast" suite runs in a couple of seconds while the slow tests take half an hour. During development, I want to run only the fast tests. When I commit, I'd like to be able to run the slow tests as well, so running the slow tests should be an option while the fast tests should be the default. On the CI server, I want to run both. It's OK (and even preferred) when the

Unit Testing CodeIgniter with Simpletest - very few tests

故事扮演 提交于 2019-12-10 15:33:56
问题 On our development team, we decided to give Unit Testing a try. We use Simpletest. However, it's been a tough road. After a week, I only have created 1 unit test that tests a certain helper file. That's it. The rest (controllers, models, views, libraries) don't have unit tests yet. And I plan to not test a majority of them. Views, for example, are too trivial to test, so I pass up on testing that. Next, the controllers. I plan my controllers to not do complex stuff, so that it only does

Should I annotate configuration class as @Configuration for testing?

那年仲夏 提交于 2019-12-10 15:22:05
问题 I spent some time resolving problem with missing org.joda.time.DateTime->java.util.Date converter in Spring Data (which should be enabled by default when Joda-Time is on a classpath). I have found a reason, but it generated a question about @Configuration annotation in Spring. Standard application config using AbstractMongoConfiguration from spring-data-mongodb: @Configuration @ComponentScan @EnableMongoRepositories public class AppConfig extends AbstractMongoConfiguration { ... } A test

Can I run multiple integration tests with one single config file in Flutter?

我怕爱的太早我们不能终老 提交于 2019-12-10 15:18:04
问题 I am trying to write Flutter integration tests and to run them all with one config file instead of making config file for every single test. Is there any way to do that? For now I have login.dart and login_test.dart and so on, for every single test. I know its convention that every config and test file must have the same name, but that's not what I need, more configurable things are welcomed. Thanks in advance. This is my config file (login.dart) import 'package:flutter_driver/driver

Fitnesse vs any other subsystem testing tool [closed]

南楼画角 提交于 2019-12-10 15:16:15
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . We are currently using Fitness for subsystem testing. we are having lot of issues using the tool, few to mention Development time for writing Fixture is more then writing the actual code Issues around check in of the dlls so that Qa can test them Issues in running Fitnesse for project which uses NHibernate limited

Integration test and unit test (WEB API mvc 4)

时光怂恿深爱的人放手 提交于 2019-12-10 14:29:17
问题 how does the integration test and unit test relevant in doing testing on APIController? and how can i mock the repository while creating the webrequest in the integration test so it does not make an actual query to the database? 回答1: You can use the Self Hosting functionality to start up the controllers and use the OpenAsync().ContinueWith(t => { /* ... */ }) function to run your tests. You'll want to override the Configuration.DependencyResolver and override the IHttpControllerActivator so

Finding my ConnectionString in .NET Core integration tests

穿精又带淫゛_ 提交于 2019-12-10 14:19:45
问题 I'm building automated integration tests for my .NET Core project. Somehow I need to get access to a connection string for my integration tests database. The new .net core no longer has the ConfigurationManager, instead configurations are injected, but there is no way (at least not that I know of) to inject the connection string to a test class. Is there any way in .NET Core that I can get at the configuration file without injecting something into a test class? Or, alternatively, is there any