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
63
votes
9 answers

Database data needed in integration tests; created by API calls or using imported data?

This question is more or less programming language agnostic. However as I'm mostly into Java these days that's where I'll draw my examples from. I'm also thinking about the OOP case, so if you want to test a method you need an instance of that…
user14070
60
votes
5 answers

How to do integration testing in .NET with real files?

I have some classes that implements some logic related to file system and files. For example, I am performing following tasks as part of this logic: checking if certain folder has certain structure (eg. it contains subfolders with specific names…
matori82
  • 3,669
  • 9
  • 42
  • 64
55
votes
9 answers

How to run individual test in the integration-test target in maven

We have a hundreds of tests defined for our integration-test phase lifecycle in maven, and they take a long time to finish. What I want to do is run just one test in the integration-test. I tried doing : mvn -Dtest= integration-test but…
Jalpesh
  • 1,603
  • 2
  • 13
  • 15
53
votes
15 answers

Should one test internal implementation, or only test public behaviour?

Given software where ... The system consists of a few subsystems Each subsystem consists of a few components Each component is implemented using many classes ... I like to write automated tests of each subsystem or component. I don't write a test…
51
votes
3 answers

Testing Snackbar show with Espresso

Is there a way to test using Espresso that the snackbar shows up with the right text? I have a simple call to create a snackbar Snackbar.make(mView, "My text", Snackbar.LENGTH_LONG).show(); I have tried this without luck onView(withText("My…
50
votes
5 answers

Capybara with subdomains - default_host

I have an app that uses subdomains to switch databases (multi-tenancy). I'm trying to use Capybara for integration testing, and it really relies a lot on subdomains. My understanding was that setting Capybara.default_host= to something would make…
brad
  • 31,987
  • 28
  • 102
  • 155
50
votes
6 answers

Configure @MockBean component before application start

I have a Spring Boot 1.4.2 application. Some code that is used during startup looks like this: @Component class SystemTypeDetector{ public enum SystemType{ TYPE_A, TYPE_B, TYPE_C } public SystemType getSystemType(){ return ...…
Marcel
  • 4,054
  • 5
  • 36
  • 50
48
votes
5 answers

Can you mark XUnit tests as Explicit?

I'm making the transition from NUnit to XUnit (in C#), and I was writing some "Integrated Tests" (ITs) that I don't necessarily want the test runner to run as part of my automated build process. I typically do this for manually testing, when the…
neumann1990
  • 1,205
  • 1
  • 11
  • 18
48
votes
3 answers

Running NUnit through Resharper 8 tests fail when crossing between projects due to AppDomain

I recently updated to Resharper 8, and when I tried to run a suite of projects. These tests contain two suites of integration tests that both use IISExpress to run a website, make web requests and check the responses. Running them in isolation is…
hawx
  • 1,313
  • 12
  • 10
47
votes
4 answers

Move cypress folder from the root of the project

When I install and run cypress, it scaffolds a cypress/ folder in the root of my project. The problem is that all other test related data is stored in the test/ folder. Is there an easy way to move it to test/cypress and configure cypress to look…
Gleb Kostyunin
  • 3,743
  • 2
  • 19
  • 36
47
votes
7 answers

Is it possible to specify a user agent in a rails integration test or spec?

I was doing this before in a rails 2 app in a ActionController::IntegrationTest with get '/', {}, {:user_agent => "Googlebot"} but this seems to not work anymore in Rails 3. What should I do?
John Bachir
  • 22,495
  • 29
  • 154
  • 227
47
votes
4 answers

Does TDD include integration tests?

I'm working on some code that includes database access. Does test-driven development include integration tests as well as the usual unit tests? Thanks!
Jon Onstott
  • 13,499
  • 16
  • 80
  • 133
46
votes
2 answers

Cucumber and Capybara, clicking a non-link or button element

I am trying to test an inplace editor using Cucumber/Capybara/Selenium stack, but my problem is that the editor is activated by clicking a div and not a link or button. I can not seem to figure out how to get Capybara to do this. Is there a way of…
trobrock
  • 46,549
  • 11
  • 40
  • 46
46
votes
2 answers

Is there a convention to distinguish Python integration tests from unit tests?

The most common way of structuring a Python package with unit tests is as follows: package/ __init__.py module_1.py module_2.py module_n.py test/ __init__.py test_module_1.py test_module_2.py …
Jace Browning
  • 11,699
  • 10
  • 66
  • 90
45
votes
9 answers

What are unit testing and integration testing, and what other types of testing should I know about?

I've seen other people mention several types of testing on Stack Overflow. The ones I can recall are unit testing and integration testing. Especially unit testing is mentioned a lot. What exactly is unit testing? What is integration testing? What…
Daniel Sloof
  • 12,568
  • 14
  • 72
  • 106