Questions tagged [integration-testing]

A form of software testing where individual software modules (or components) are combined and tested as a group. Integration testing happens after unit testing, and before system testing.

Integration testing is a form of software testing where individual software modules (or components) are combined and tested as a group. Integration testing happens after unit testing, and before system testing.

In an integration test, all input modules are modules that have already been unit tested. These modules are grouped in larger aggregates and integration tests are applied to those aggregates. After a successful integration test, the integrated system is ready for system testing.

6972 questions
44
votes
8 answers

How to mock Amazon S3 in an integration test

I'm trying to get an "walking skeleton" of my app up that will use S3 for persistence. I would like to use a fake S3 service so each developer's desktop can read/write at will. I thought mocks3 would be perfect, as I could get a jetty server up in…
Michael Deardeuff
  • 10,386
  • 5
  • 51
  • 74
44
votes
2 answers

Wiremock: Multiple responses for the same URL and content?

Also shared here: https://github.com/tomakehurst/wiremock/issues/625 I'm writing an integration test to verify that my application that interacts with a REST API handles unsuccessful requests appropriately. To do this, I'm wanting to simulate a…
rugden
  • 1,085
  • 2
  • 9
  • 11
44
votes
3 answers

Does Google provide test users for integration testing

Test users are very good to do integration testing. When I develop facebook oauth enabled stuff I can programmatically create test users and use them as real users of my application. They behave in the same way of real users, the only difference is…
Fabio
  • 18,856
  • 9
  • 82
  • 114
43
votes
15 answers

Why using Integration tests instead of unit tests is a bad idea?

Let me start from definition: Unit Test is a software verification and validation method in which a programmer tests if individual units of source code are fit for use Integration testing is the activity of software testing in which individual…
andrey.tsykunov
  • 2,896
  • 2
  • 32
  • 21
43
votes
3 answers

Mocking for integration tests

How does one mock the many dependencies needed for integration tests? I use Mockito for my 'pure' unit tests. 'Pure' in this case means testing a single class, mocking all of it's dependencies. Beautiful. Now come integration tests. Let's say in…
Roy Truelove
  • 22,016
  • 18
  • 111
  • 153
42
votes
1 answer

Maven separate Unit Test and Integration Tests

UT = Unit Tests IT = Integration Tests. All my Integration test classes are annotated with @Category(IntegrationTest.class) My goal is: mvn clean install => runs UT and not IT mvn clean install -DskipTests=true => no tests are executed mvn clean…
41
votes
10 answers

Can we use JUNIT for Automated Integration Testing?

How do you automate integration testing? I use JUnit for some of these tests. This is one of the solutions or is totally wrong? What do you suggest?
Eduardo Santa
  • 858
  • 2
  • 8
  • 13
41
votes
3 answers

Login with code when using LiveServerTestCase with Django

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…
Chris Del Guercio
  • 765
  • 1
  • 6
  • 13
40
votes
7 answers

Unit tests vs integration tests with Spring

I'm working on a Spring MVC project, and I have unit tests for all of the various components in the source tree. For example, if I have a controller HomeController, which needs to have a LoginService injected into it, then in my unit test…
matt b
  • 138,234
  • 66
  • 282
  • 345
40
votes
5 answers

Exactly what is integration testing - compared with unit

I am starting to use unit testing in my projects, and am writing tests that are testing at the method/function level. I understand this and it makes sense. But, what is integration testing? From what i read it moves the scope of testing up to test…
Marty Wallace
  • 34,046
  • 53
  • 137
  • 200
40
votes
6 answers

How to mock request and response in nodejs to test middleware/controllers?

My application has several layers: middleware, controllers, managers. Controllers interface is identical to middlewares one: (req, res, next). So my question is: how can I test my controllers without starting the server and sending 'real' requests…
potomok
  • 1,249
  • 3
  • 12
  • 16
38
votes
3 answers

How to use WebApplicationFactory in .net6 (without speakable entry point)

In ASP.NET Core 6 default template moves everything from Sturtup.cs into Program.cs, and uses top-level statements in Program.cs, so there's no more (speakable) Program class ether. That looks awesome, but now, I need to test all of this.…
maxc137
  • 2,291
  • 3
  • 20
  • 32
37
votes
3 answers

Java, Junit - Capture the standard input / Output for use in a unit test

I'm writing integration tests using JUnit to automate the testing of a console based application. The application is homework but this part isn't the homework. I want to automate these tests to be more productive -- I don't want to have to go back…
Frank V
  • 25,141
  • 34
  • 106
  • 144
37
votes
5 answers

Temporary e-mail accounts for integration tests

I would like to write some integration tests which verify if user receive registration confirmation e-mails. Ideally, for this purpose I would like: Create temporary e-mail account. Pass it in registration form. Check if we receive e-mail. Delete…
Jakozaur
  • 1,957
  • 3
  • 18
  • 20
36
votes
6 answers

JUnit test report enrichment with JavaDoc

For a customer we need to generate detailed test reports for integration tests which not only show, that everything is green, but also what the test did. My colleagues and I are lazy guys and we do not want to hack spreadsheets or text…