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
433
votes
5 answers

What's the difference between unit tests and integration tests?

What's the difference between unit tests and integration tests? Are there different names for these tests? Like some people calling unit tests functional tests, etc?
Books
  • 5,163
  • 5
  • 19
  • 18
352
votes
21 answers

What is the difference between integration and unit tests?

I know the so-called textbook definition of unit tests and integration tests. What I am curious about is when it is time to write unit tests... I will write them to cover as many sets of classes as possible. For example, if I have a Word class, I…
Mike Stone
  • 44,224
  • 30
  • 113
  • 140
274
votes
3 answers

Karma vs testing framework Jasmine, Mocha, QUnit

Few questions: How Karma and testing framework X (Jasmine, Mocha, QUnit) relate to each other? What is the equivalent framework at Java world? I assume Jasmine, Mocha, QUnit equal to jUnit/TestNG. How about Karma? Can I run testing framework X…
Lee Chee Kiam
  • 11,450
  • 10
  • 65
  • 87
192
votes
7 answers

Prevent unit tests but allow integration tests in Maven

I've a Maven build in which I use the SureFire plugin to run some unit tests, and the FailSafe plugin to run some integration tests. I would like a way to run just the FailSafe plugin's tests. It's not a good solution for me to add different…
149
votes
6 answers

Separating unit tests and integration tests in Go

Is there an established best practice for separating unit tests and integration tests in GoLang (testify)? I have a mix of unit tests (which do not rely on any external resources and thus run really fast) and integration tests (which do rely on any…
Craig Jones
  • 2,428
  • 2
  • 17
  • 11
141
votes
6 answers

Junit: splitting integration test and Unit tests

I've inherited a load of Junit test, but these tests (apart from most not working) are a mixture of actual unit test and integration tests (requiring external systems, db etc). So I'm trying to think of a way to actually separate them out, so that I…
jeff porter
  • 6,560
  • 13
  • 65
  • 123
136
votes
6 answers

RSpec vs Cucumber (RSpec stories)

When should I use specs for Rails application and when Cucumber (former rspec-stories)? I know how both work and actively use specs, of course. But it still feels weird to use Cucumber. My current view on this, is that it's convenient to use…
orion3
  • 9,797
  • 14
  • 67
  • 93
135
votes
11 answers

Embedded MongoDB when running integration tests

My question is a variation of this one. Since my Java Web-app project requires a lot of read filters/queries and interfaces with tools like GridFS, I'm struggling to think of a sensible way to employ MongoDB in the way the above solution…
seanhodges
  • 17,426
  • 15
  • 71
  • 93
127
votes
6 answers

Unit Test? Integration Test? Regression Test? Acceptance Test?

Is there anyone that can clearly define these levels of testing as I find it difficult to differentiate when doing TDD or unit testing. Please if anyone can elaborate how, when to implement these?
118
votes
10 answers

How do I add a new sourceset to Gradle?

I want to add integration tests to my Gradle build (Version 1.0). They should run separately from my normal tests because they require a webapp to be deployed to localhost (they test that webapp). The tests should be able to use classes defined in…
Spina
  • 8,986
  • 7
  • 37
  • 36
105
votes
5 answers

Testing Spring's @RequestBody using Spring MockMVC

I am trying to test a method that posts an object to the database using Spring's MockMVC framework. I've constructed the test as follows: @Test public void testInsertObject() throws Exception { String url = BASE_URL + "/object"; …
Matt
  • 5,408
  • 14
  • 52
  • 79
97
votes
18 answers

What Makes a Good Unit Test?

I'm sure most of you are writing lots of automated tests and that you also have run into some common pitfalls when unit testing. My question is do you follow any rules of conduct for writing tests in order to avoid problems in the future? To be…
Spoike
  • 119,724
  • 44
  • 140
  • 158
91
votes
3 answers

How are integration tests written for interacting with external API?

First up, where my knowledge is at: Unit Tests are those which test a small piece of code (single methods, mostly). Integration Tests are those which test the interaction between multiple areas of code (which hopefully already have their own Unit…
Jess Telford
  • 12,880
  • 8
  • 42
  • 51
89
votes
5 answers

Stubbing authentication in request spec

When writing a request spec, how do you set sessions and/or stub controller methods? I'm trying to stub out authentication in my integration tests - rspec/requests Here's an example of a test require File.dirname(__FILE__) +…
Jonas Bylov
  • 1,494
  • 2
  • 15
  • 28
89
votes
7 answers

Difference between Android Instrumentation test and Unit test in Android Studio?

As of Android Studio 1.1rc there's Unit testing support and I'm wondering what's the difference between Android Instrumentation Tests and Unit tests. As I understand it: Unit tests are useful for testing code which doesn't call the Android API, and…
Joen93
  • 1,197
  • 1
  • 10
  • 8
1
2 3
99 100