integration-testing

End to end integration test for multiple spring boot applications under Maven

纵饮孤独 提交于 2019-12-03 05:50:50
问题 What is the recommended way of running an end to end integration test for multiple Spring boot applications in the Maven build's verify phase? Basically, I have a multi-module Maven project where several modules are separate spring boot applications. These separate applications have their own configuration for data sources, integration flows with JMS queues, etc. For example, application A will poll a database for an event, and when that occurs, it produces a JSON file of data and puts a

Has anyone used Steve Sanderson’s MvcIntegrationTestFramework?

纵然是瞬间 提交于 2019-12-03 05:46:12
I was looking into additional ways to test ASP.NET MVC applications and ran into Steve Sanderson’s MvcIntegrationTestFramework . The approach looks rather promising but I was wondering if anyone had any actual experience to share. I'm having some really good results from it. I don't care what anyone else on here says about the need to test views, as soon as you add your first line of code to a view, even if the code is strictly presentation-related, you introduce a potential for errors for which it would be a good idea to write automated tests. My primary interest is just to catch as many

Benefits of Maven FailSafe Plugin

Deadly 提交于 2019-12-03 05:34:27
问题 I read Maven Failsafe plugin is designed specifically to run integration tests. Currently I'm working on a multi-module project and integration tests are in its own separate module, written in TestNg and run using Surefire plugin. We don't have conflicts with unit tests since only integration tests are run in the test phase in that module. And to set up the environment before the tests, and clean it after tests are run, @BeforeSuite @AfterSuite TestNg annotations are used. So there's no need

Integration Test Coverage in SonarQube from JaCoCo Maven plug-in showing 0%

烂漫一生 提交于 2019-12-03 05:28:37
We have a multi-module multi-language maven java project with coverage analysis with jacoco. The main part of the modules is backend (Java code) with a REST API and our webapp module contains the frontend (AngularJS) and the Integration-Tests in java. Our Jacoco-IT.exec file contains around 100Kb of data so we guess some Coverage data for the Integration tests could get collected. Nevertheless we cant see any coverage in SonarQube (using Version 5.0 and 4.5) We run build the Project and run the integration tests with mvn clean install and analyse the data with mvn sonar:sonar The Project is

Inject mock into Spring MockMvc WebApplicationContext

走远了吗. 提交于 2019-12-03 05:21:41
问题 I'm working to test (via JUnit4 and Spring MockMvc) a REST service adapter using Spring-boot. The adapter simply passes along requests made to it, to another REST service (using a custom RestTemplate ) and appends additional data to the responses. I'd like to run MockMvc tests to perform controller integration tests, but want to override the RestTemplate in the controller with a mock to allow me to predefine the 3rd party REST response and prevent it from being hit during each test. I've been

Failing integration test for Apache Spark Streaming

送分小仙女□ 提交于 2019-12-03 05:21:35
I've been trying to track down an issue with some unit/integration tests I've been writing for an Apache Spark project. When using Spark 1.1.1 my test passed. When I tried to upgrade to 1.4.0 (also tried 1.4.1) the test starts failing. I've managed to reduce the code needed to reproduce the issue down to the small integration test below. Interestingly, if I comment out the @RunWith annotation on the test then the test passes correctly. Obviously I don't need the @RunWith annotation for this cut down test, but the real tests make use of mocks fairly extensively, so I'd rather not have to drop

Integration testing database, am I doing it right?

旧街凉风 提交于 2019-12-03 05:11:00
问题 I want to test methods in my MVC4 application that rely on and work with a database. I do not want to use mock methods / objects because the queries can be complicated and creating test objects for that is too much of an effort. I found the idea of integration testing that wraps your test's database manipulating logic in a TransactionScope object that rolls back the changes when done. Unfortunately, this does not start with an empty database at first and it also makes the primary keys count

When to choose system test over integration test Rails 5.1?

不羁的心 提交于 2019-12-03 05:07:23
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 test. So when should I choose system test to write a test case and when to choose integration tests ? The

How to test Android UI using IdlingResource when using Retrofit network requests

我怕爱的太早我们不能终老 提交于 2019-12-03 04:25:16
问题 I am writing integration tests that perform actions in the UI which start network calls using Retrofit . I know I need to implement a CountingIdlingResource, but I want to do it the correct way (and not reinvent the wheel if it has already been done). Has anyone implemented an IdlingResource in their app's Espresso test suite to wait while network requests execute? More info here. 回答1: The most straightforward solution for this: is to basically swap out Retrofit's Thread-pool executor with an

Login with code when using LiveServerTestCase with Django

耗尽温柔 提交于 2019-12-03 01:58:23
问题 So I have a Selenium functional test suite. I've already tested login/signup functionality in a few tests by navigating the Selenium client to the signup page, entering in a username and password, and then telling Selenium to login with those same credentials. Now I want to test other parts of the "login required" areas of the site without having to tell Selenium to click and enter text into the test browser. In other words, I would like to use something like this (which I use just fine in my