What is the difference between integration testing and functional testing?

Testing

Testing Problem Overview


Are functional testing and integration testing the same?

You begin your testing through unit testing, then after completing unit testing you go for integration testing where you test the system as a whole. Is functional testing the same as integration testing? You still taking the system as a whole and testing it for functionality conformance.

Testing Solutions


Solution 1 - Testing

Integration testing is when you test more than one component and how they function together. For instance, how another system interacts with your system, or the database interacts with your data abstraction layer. Usually, this requires a fully installed system, although in its purest forms it does not.

Functional testing is when you test the system against the functional requirements of the product. Product/Project management usually writes these up and QA formalizes the process of what a user should see and experience, and what the end result of those processes should be. Depending on the product, this can be automated or not.

Solution 2 - Testing

Functional Testing:

Yes, we are testing the product or software as a whole functionally whether it is functionally working properly or not (testing buttons, links etc.)

For example: Login page.

you provide the username and password, you test whether it is taking you to home page or not.

Integration Testing:

Yes, you test the integrated software only but you test where the data flow is happening and is there any changes happening in the database.

For example: Sending e-mail

You send one mail to someone, there is a data flow and also change in database (the sent table increases value by 1)


Remember - clicking links and images is not integration testing. Hope you understood why, because there is no change in database by just clicking on a link.

Hope this helped you.

Solution 3 - Testing

Functional Testing: It is a process of testing where each and every component of the module is tested. Eg: If a web page contains text field, radio botton, Buttons and Drop down etc components needed to be checked.

Integration Testing: Process where the dataflow between 2 modules are checked.

Solution 4 - Testing

This is an important distinction, but unfortunately you will never find agreement. The problem is that most developers define these from their own point of view. It's very similar to the debate over Pluto. (If it were closer to the Sun, would it be a planet?)

Unit testing is easy to define. It tests the CUT (Code Under Test) and nothing else. (Well, as little else as possible.) That means mocks, fakes, and fixtures.

At the other end of the spectrum there is what many people call system integration testing. That's testing as much as possible, but still looking for bugs in your own CUT.

But what about the vast expanse between?

  • For example, what if you test just a little bit more than the CUT? What if you include a Fibonacci function, instead of using a fixture which you had injected? I would call that functional testing, but the world disagrees with me.
  • What if you include time() or rand()? Or what if you call http://google.com? I would call that system testing, but again, I am alone.

Why does this matter? Because system-tests are unreliable. They are necessary, but they will sometimes fail for reasons beyond your control. On the other hand, functional tests should always pass, not fail randomly; if they are fast, they might as well be used from the start in order to use Test-Driven Development without writing too many tests for your internal implementation. In other words, I think that unit-tests can be more trouble than they are worth, and I have good company.

I put tests on 3 axes, with all their zeroes at unit-testing:

  1. Functional-testing: using real code deeper and deeper down your call-stack.
  2. Integration-testing: higher and higher up your call-stack; in other words, testing your CUT by running the code which would use it.
  3. System-testing: more and more unrepeatable operations (O/S scheduler, clock, network, etc.)

A test can easily be all 3, to varying degrees.

Solution 5 - Testing

I would say that both are tightly linked to each other and very tough to distinguish between them. In my view, Integration testing is a subset of functional testing.

Functionality testing is based on the initial requirements you receive. You will test the application behaviour is as expected with the requirements.

When it comes to integration testing, it is the interaction between modules. If A module sends an input, B module able to process it or not.

Solution 6 - Testing

Integration testing - Integration testing is nothing but the testing of different modules. You have to test relationship between modules. For ex you open facebook then you see login page after entering login id and password you can see home page of facebook hence login page is one module and home page is another module. you have to check only relationship between them means when you logged in then only home page must be open not message box or anything else. There are 2 main types of integration testing TOP-DOWN approach and BOTTOM UP approach.

Functional Testing - In functional testing you have to only think about input and output. In this case you have to think like a actual user. Testing of What input you gave and what output you got is Functional testing. you have to only observe output. In functional testing you don't need to test coding of application or software.

Solution 7 - Testing

In a Functional testing tester focuses only Functionality and sub functionality of application. Functionality of app should be working properly or not.

In integration testing tester have to check dependency between modules or sub-modules.Example for modules records should be fetching and displayed correctly in another module.

Solution 8 - Testing

Integration Test:- When Unit testing is done and issues are resolved to the related components then all the required components need to integrate under the one system so that it can perform an operation. After combining the components of the system,To test that whether the system is working properly or not,this kind of testing is called as Integration Testing.

Functional Testing:- The Testing is mainly divided into two categories as 1.Functional Testing 2.Non-Functional Testing **Functional Testing:- To test that whether the software is working according to the requirements of the user or not. **Non-Functional Testing:- To test that whether the software satisfies the quality criteria like Stress Test,Security test etc.

Usually,Customer will provide the requirements for Functional Test only and for Non Functional test,Requirements should not be mentioned but the application necessarily perform those activity.

Solution 9 - Testing

Integration testing

  • It can be seen as how the different modules of the system work together.
  • We mostly refers to the integrated functionality of the different modules, rather different components of the system.
  • For any system or software product to work efficiently, every component has to be in sync with each other.
  • Most of the time tool we used for integration testing will be chosen that we used for unit testing.
  • It is used in complex situations, when unit testing proves to be insufficient to test the system.

    Functional Testing

  • It can be defined as testing the individual functionality of modules.
  • It refers to testing the software product at an individual level, to check its functionality.
  • Test cases are developed to check the software for expected and unexpected results.
  • This type of testing is carried out more from a user perspective. That is to say, it considers the expectation of the user for a type of input.
  • It is also referred as black-box testing as well as close-box testing

  • Solution 10 - Testing

    Checking the functionality of the application is generally known as functional testing, where as the integration testing is to check the flow of data from one module to other. Lets take example of money transfer app.Suppose we have page in which we enter all the credentials and if we press transfer button and after that if we getting any success, Then this is functional testing. But in same example if we verify the amount transfer then it is integration testing.

    Solution 11 - Testing

    Authors diverge a lot on this. I don't believe there is "the" correct interpretation for this. It really depends.

    For example: most Rails developers consider unit tests as model tests, functional tests as controller tests and integration tests as those using something like Capybara to explore the application from a final user's perspective - that is, navigating through the page's generated HTML, using the DOM to check for expectations.

    There is also acceptance tests, which in turn are a "live" documentation of the system (usually they use Gherkin to make it possible to write those in natural language), describing all of the application's features through multiple scenarios, which are in turn automated by a developer. Those, IMHO, could be also considered as both, functional tests and integration tests.

    Once you understand the key concept behind each of those, you get to be more flexible regarding the right or wrong. So, again IMHO, a functional test could also be considered an integration test. For the integration test, depending on the kind of integration it's exercising, it may not be considerate a functional test - but you generally have some requirements in mind when you are writing an integration test, so most of the time it can be also considerate as a functional test.

    Attributions

    All content for this solution is sourced from the original question on Stackoverflow.

    The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

    Content TypeOriginal AuthorOriginal Content on Stackoverflow
    QuestionMishthiView Question on Stackoverflow
    Solution 1 - TestingaceintheholeView Answer on Stackoverflow
    Solution 2 - Testingjsborn17View Answer on Stackoverflow
    Solution 3 - TestingraghuramView Answer on Stackoverflow
    Solution 4 - Testingcdunn2001View Answer on Stackoverflow
    Solution 5 - TestingNaiduView Answer on Stackoverflow
    Solution 6 - TestingYogesh DeshpandeView Answer on Stackoverflow
    Solution 7 - TestingKrunalView Answer on Stackoverflow
    Solution 8 - Testingmohit sarsarView Answer on Stackoverflow
    Solution 9 - TestingShahView Answer on Stackoverflow
    Solution 10 - TestingRahul TalwarView Answer on Stackoverflow
    Solution 11 - TestingNicholas PufalView Answer on Stackoverflow