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.

6128 questions
397
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
  • 4,773
  • 5
  • 17
  • 16
322
votes
20 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
  • 42,897
  • 27
  • 110
  • 137
263
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
  • 9,693
  • 10
  • 56
  • 76
167
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…
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…
snitko
  • 9,407
  • 10
  • 59
  • 89
129
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,196
  • 13
  • 59
  • 112
121
votes
10 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
  • 16,593
  • 14
  • 67
  • 89
118
votes
5 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,080
  • 2
  • 15
  • 11
109
votes
8 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,388
  • 7
  • 34
  • 35
108
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?
Donny
  • 4,738
  • 8
  • 35
  • 50
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
  • 112,352
  • 42
  • 133
  • 155
86
votes
10 answers

How to test a confirm dialog with Cucumber?

I am using Ruby on Rails with Cucumber and Capybara. How would I go about testing a simple confirm command ("Are you sure?")? Also, where could I find further documentation on this issue?
Yuval Karmi
  • 24,847
  • 38
  • 116
  • 172
85
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,394
  • 1
  • 13
  • 26
84
votes
11 answers

Before and After Suite execution hook in jUnit 4.x

I'm trying to preform setup and teardown for a set of integration tests, using jUnit 4.4 to execute the tests. The teardown needs to be run reliably. I'm having other problems with TestNG, so I'm looking to port back to jUnit. What hooks are…
sblundy
  • 58,164
  • 22
  • 117
  • 120
83
votes
8 answers

How to make Capybara check for visibility after some JS has run?

After loading a page I have code that runs and hides and shows various items based on data returned by an xhr. My integration test looks something like this: it "should not show the blah" do page.find('#blah').visible?.should be_true end When…
Kevin Davis
  • 2,715
  • 1
  • 21
  • 26
1
2 3
99 100