Integration testing is the phase in software testing in which individual software modules are combined and tested as a group. No mocks or stubs are required; everything is tested as in production.

learn more… | top users | synonyms

26
votes
7answers
2k views

Is it sufficient to use acceptance and integration tests instead of unit test?

Short introduction to this question. I have used now TDD and lately BDD for over one year now. I use techniques like mocking to make writing my tests more efficiently. Lately I have started a ...
19
votes
4answers
984 views

Is BDD scalable for medium to large projects?

In every Website you read about BDD (Behaviour Driven Development) you find a very simple nice example showing you how obvious and easy is it to define your requirements. But trying to implement this ...
17
votes
7answers
647 views

What can you do about the quality of existing integration and unit tests while being the new guy in a team ?

A recurring theme that I came across in my career is being the new developer to arrive in a team, and quickly having an inherent distrust of the existing unit and integration test suites. During the ...
16
votes
7answers
1k views

When should I write integration tests?

According to rules of TDD unit tests are written before production code, but what about Integration tests that exercises interaction between concrete (non mocks) wired objects? Should they be written ...
15
votes
6answers
705 views

From a TDD perspective, am I a bad person if I test against a live endpoint instead of a mock?

I follow TDD religiously. My projects typically have 85% or better test coverage, with meaningful test cases. I do a lot of work with HBase, and the main client interface, HTable, is a real pain ...
14
votes
5answers
1k views

Databases and Unit/Integration Testing

I have had a discussion with someone about unit/integration testing with web applications and I have a disagreement about 1 core idea. The issues is that the person I am talking to think that the ...
13
votes
4answers
2k views

Is there a point to unit tests that stub and mock everything public?

When doing unit tests the "proper" way, i.e. stubbing every public call and return preset values or mocks, I feel like I'm not actually testing anything. I'm literally looking at my code and creating ...
13
votes
1answer
801 views

How do I test a file reader?

I am working on a project with a few file formats. Some formats are specified by .xsds, others by documentation on their respective websites, and some are custom in-house formats that have no ...
12
votes
5answers
637 views

How to create scalable & side-effect free integration tests?

In my current project, I am having a hard time coming up with a good solution to create scalable integration tests that have no side effects. A little clarification on the side effect free property: ...
12
votes
1answer
276 views

Are there any studies on the relationship between software testing practices and developer productivity? [closed]

Are there any studies on the relationship between software testing practices (unit and/or integration tests) and developer productivity?
12
votes
3answers
3k views

Unit testing C++: What to test?

TL;DR Writing good, useful tests is hard, and has a high cost in C++. Can you experienced developers share your rationale on what and when to test? Long story I used to do test-driven development, ...
10
votes
3answers
696 views

How to do external API testing (blackbox)

Assume you are using APIs from a vendor, how to make sure their API is working as expected? My main concern is sometimes the vendor pushed the changes to their code and break the API, we want to have ...
9
votes
3answers
650 views

Ramping Up On Legacy Code

When starting to work on a project with an existing code base, the first thing that needs to be done is usually to understand the application & existing code. Let's assume that the existing code ...
8
votes
2answers
406 views

How do I know if I have enough unit test coverage to remove an integration test?

I'm working on a legacy system (by that I mean it was written without tests). We've tried to test some of the system by writing integration tests that test functionality from the outside. This ...
8
votes
2answers
246 views

Should I refactor my unit tests when I extract a class out of the System Under Test?

I wrote this class that does a few things (perhaps this is a violation of the Single Responsibility Principle). I realize now that some other part of the project needs a piece of that logic and the ...
7
votes
3answers
295 views

Non-transactional Database and Integration Testing

One issue I think I am going to run into with my integration testing is having multiple tests accessing the same database. While this is not a problem now, I know we have multiple applications here ...
7
votes
2answers
300 views

Databases and the CI server

I have a CI server (Hudson) which merrily builds, runs unit tests and deploys to the development environment but I'd now like to get it running the integration tests. The integration tests will hit a ...
6
votes
4answers
459 views

I have 200k lines of poorly designed code, will units tests or integration tests be more valuable? [duplicate]

I've inherited a lot of poorly designed code; the code has no tests. I am putting tests in place before I attempt a major refactor, but I have run into a problem with my unit tests. The problem is, I ...
6
votes
5answers
684 views

Do I need unit test if I already have integration test?

If I already have integration test for my program, and they all passed, then I have a good feel that it will work. Then what are the reasons to write/add unit tests? Since I already have to write ...
6
votes
3answers
2k views

Unit testing vs Integration Testing [duplicate]

What is the difference between unit testing and integration testing when it come to web development (where 90-95% of the code relies on a database)? One thing I here all the time is that unit testing ...
6
votes
2answers
501 views

BDD to replace the test teams work - how best to do it?

The system we are developing, using .NET, is extremely large, complex, and some modules are poorly written. We have a large user acceptance test team that is aiming for 100% business scenario ...
5
votes
3answers
2k views

How can I unit test a class which requires a web service call?

I'm trying to test a class which calls some Hadoop web services. The code is pretty much of the form: method() { ...use Jersey client to create WebResource... ...make request... ...do ...
5
votes
3answers
1k views

Where should I draw the line between unit tests and integration tests? Should they be separate?

I have a small MVC framework I've been working on. It's code base definitely isn't big, but it's not longer just a couple of classes. I finally decided to take the plunge and start writing tests for ...
4
votes
4answers
764 views

Introducing a (new) test method to a team

A couple of months ago I was hired in a new job. (I'm fresh out of my Masters in software engineering) The company mainly consists of ERP consultants, but I was hired in their fairly small web ...
4
votes
5answers
600 views

How can I test parts of my application against the output of third party application?

I have a fairly new C# application, approximately 6 months old, that we are now trying to incorporate testing into. (Should have been done from the start but I can't change the past) Parts of this ...
4
votes
4answers
95 views

Should I write an integration test that verifies rate limits?

This test would call a web service over and over for about a minute to confirm that a particular response code is returned, notifying us of our rate limit being reached. Not only is it a very slow ...
4
votes
1answer
5k views

How can I unit-test my REST web service?

I am new to unit testing, I've one REST web method that just calls DB and populates a DTO. Pseudo code is public object GetCustomer(int id) { CustomerDTO objCust = //get from DB return objCust; } ...
4
votes
3answers
209 views

Should integration test be included in continues integration (CI)?

Assume that we are developing a web application, and Hudson does typical jobs such as compile, unit test and static code analysis. But the tricky part is: Hudson deploys and starts up application ...
4
votes
1answer
404 views

Integration tests across a 3-tier .NET solution

I have a 3-tiered .NET solution. Database (SQL SERVER 2008) Web Service (SOAP Service - *.asmx) WPF Client I am comfortably writing Unit Tests within (3) The Client. I am currently working on ...
4
votes
1answer
84 views

Managing manual test protocols

We have to organize a very long list of manually running tests. Currently we use Word documents, print them out check them off etc. Ugh-ly but works, with problems. Problems with the current solution ...
3
votes
6answers
445 views

Why don't I see many unit test projects that bring up and tear down a DB? (ASP.NET MVC)

I see all the examples that demonstrate unit testing code and mocking the calls to the DB since you are not suppose to touch the DB. But it seems to me having a set up tasks that uses the actually ...
3
votes
4answers
931 views

Why do I need unit tests for testing repository methods?

I need to play devils advocate on this question a bit because I cannot defend it well because of lack of experience. Here is the deal, I get conceptually the differences between unit testing and ...
3
votes
4answers
613 views

Choosing names for integration tests

With unit tests the domain is quite small, so it's easy. I used Osherove's methodName_conditions_result() scheme and found it very clear. But with integration tests I feel like it would make a very ...
3
votes
3answers
781 views

Unit/Integration Testing my DAL

So I've done some research on this but I couldn't quite come to a conclusion, so I figured I'd ask you guys to see if I could get some other opinions. All of my database access is currently done ...
3
votes
1answer
1k views

How to unit test image processing code?

I'm working in image processing (mainly OCR) and I wonder how I should integrate unit tests in my development. I'm already using unit tests for more "common" type of code but when dealing with image ...
3
votes
1answer
295 views

Looking for resources on TDD and BDD

I'm doing a presentation this week for Uni on the application of TDD and BDD. I'm trying to focus on types of code (such as algorithms, business logic or crud) and which methodology (if at any at all) ...
3
votes
1answer
148 views

How to deal with the notion of time in UI/Integration tests

There are some well-known techniques for dealing with the notion of time in unit tests. These allow you to write unittests that always work with a specific time so the outcome of the test is ...
3
votes
1answer
167 views

Shared context: good or bad?

RSpec allows users to share context across tests / examples, which would reduce the number of code lines in my app by a significant amount. On the other hand, somehow related to the question of ...
2
votes
4answers
206 views

What's the point of Continuous Integration services like Travis CI?

As far as I can tell, services like Travis CI and CircleCI take your project and run its test suite whenever you push a new change to your repository. Assuming that it's also possible to either ...
2
votes
2answers
354 views

Unit Tests work but there are still bugs?

Brief History I am new to Automated Unit Testing and Mocking objects world; previously we used to do Unit Testing (including Integration Testing and we mistakenly referred that as Unit Testing) ...
2
votes
1answer
115 views

How to test a function that updates the password in database?

I have a test database with few user accounts. I don't want to break any tests. If I am writing a function that updates password for user in db and one that reads the password. Should I ideally reset ...
2
votes
1answer
429 views

Does a project using proper TDD have a lot of code without tests?

Most (all?) TDD resources show you how the cycle goes: Write Test Check Test Write Production Code Check Test Clean up Production Code Check test They also - to me - seem to imply that all code ...
2
votes
1answer
96 views

Unit test JSON parsing code?

In my humble view of unit testing a unit test tests a single unit of code. For me, this means a single class. Every dependency for that class is mocked in the corresponding test class, and passed in ...
2
votes
3answers
470 views

Testing an IRC Bot

I'm using Autumn gem to create a Ruby IRC bot for a game. However, it makes me feel rather embarrassed because I don't know how to test this kind of program... I think I should mock the IO process to ...
2
votes
2answers
106 views

Don't Repeat Yourself across integration-test code and production code?

I totally believe in not repeating yourself in production code. I've accepted the idea that you shouldn't repeat yourself within test code. But what happens when you have production services that ...
2
votes
1answer
1k views

Difference between functional test and integration test

I am deeply confused the difference. I've read so many definitions and they always explain functional test as testing the requirement is satisfied. Well, that's just rephrasing the name functional ...
2
votes
1answer
121 views

How can I automatically test a large, complex spreadsheet?

So, I've inherited one of those "Engineer's Special" spreadsheets -- the kind developed by Mort the Engineer, with lots of hairy VBA and WTF, complicated calculations, and no documentation. ...
2
votes
1answer
313 views

How to unit test a web client?

I am having a lot of trouble understanding how to unit test my web client. I have just finished a project using TDD for the first time - this project hd no external dependencies such as API calls or ...
2
votes
3answers
303 views

In integration testing, do you use the data access objects for setup and validation or a different data access method?

When writing integration tests for business logic objects and data access objects, what makes the most sense to use for setup and validation? In my case, I'm using an ORM in the implementation of my ...
2
votes
1answer
101 views

Should front-end integration tests make HTTP requests?

I am developing a single-page web application using AngularJS. Data for this application is consumed over a REST API which is well tested in its own right. The Angular application has a bunch of unit ...