Home What is Unit test, Integration Test, Smoke test, Regression Test?
Reply: 20

What is Unit test, Integration Test, Smoke test, Regression Test?

mcaaltuntas
1#
mcaaltuntas Published in 2009-02-06 12:08:34Z

What is Unit test, Integration Test, Smoke test, Regression Test and what are the differences between them? And Which tools can I use for each of them?

For example I use JUnit and NUnit for Unit testing and Integration Testing. Are there any Smoke Test or Regression Test tools?

thiagowfx
2#
thiagowfx Reply to 2018-01-31 03:49:19Z
  • Unit test: Specify and test one point of the contract of single method of a class. This should have a very narrow and well defined scope. Complex dependencies and interactions to the outside world are stubbed or mocked.

  • Integration test: Test the correct inter-operation of multiple subsystems. There is whole spectrum there, from testing integration between two classes, to testing integration with the production environment.

  • Smoke test (aka Sanity check): A simple integration test where we just check that when the system under test is invoked it returns normally and does not blow up. It is an analogy with electronics, where the first test occurs when powering up a circuit: if it smokes, it's bad.

  • Regression test: A test that was written when a bug was fixed. It ensures that this specific bug will not occur again. The full name is "non-regression test". It can also be a test made prior to changing an application to make sure the application provides the same outcome.

To this, I will add:

  • Acceptance test: Test that a feature or use case is correctly implemented. It is similar to an integration test, but with a focus on the use case to provide rather than on the components involved.

  • System test: Tests a system as a black box. Dependencies on other systems are often mocked or stubbed during the test (otherwise it would be more of an integration test).

  • Pre-flight check: Tests that are repeated in a production-like environment, to alleviate the 'builds on my machine' syndrome. Often this is realized by doing an acceptance or smoke test in a production like environment

PS: People claim smoke testing comes from plumbing where smoke is pumped in the system of pipes before it's connected to the water supply. If any smoke comes out, the pipes are not properly sealed. It might be more historically accurate, but I find it is less funny.

Gerrie Schenck
3#
Gerrie Schenck Reply to 2009-02-06 12:13:56Z
  • Unit test: an automatic test to test the internal workings of a class. It should be a stand-alone test which is not related to other resources.
  • Integration test: an automatic test that is done on an environment, so similar to unit tests but with external resources (db, disk access)
  • Regression test: after implementing new features or bug fixes, you re-test scenarios which worked in the past. Here you cover the possibility in which your new features break existing features.
  • Smoke testing: first tests on which testers can conclude if they will continue testing.
Jon Skeet
4#
Jon Skeet Reply to 2009-02-06 12:15:07Z

Everyone will have slightly different definitions, and there are often grey areas. However:

  • Unit test: does this one little bit (as isolated as possible) work?
  • Integration test: do these two (or more) components work together?
  • Smoke test: does this whole system (as close to being a production system as possible) hang together reasonably well? (i.e. are we reasonably confident it won't create a black hole?)
  • Regression test: have we inadvertently re-introduced any bugs we'd previously fixed?
annakata
5#
annakata Reply to 2009-02-06 12:27:23Z

apocryphal historical trivia: "smoke testing" comes from submarine engineering (inherited from plumbing) where literal smoke would be pumped into the hull to see if any of it came out again, which would be rather a dramatic failure for a submarine!

uriDium
6#
uriDium Reply to 2009-02-06 12:31:31Z

Some good answers already but I would like further refine them:

Unit testing is the only form of white box testing here. The others are black box testing. White box testing means that you know the input, you know the inner workings of the mechanism and can inspect it and you know the output. With black box testing you only know what the input is and what the output should be.

So clearly unit testing is the only white box testing here.

  • Unit testing test specific pieces of code. Usually methods.
  • Integration testing test whether your new feature piece of software can intergrate with everything else.
  • Regression testing. This is testing done to make sure you haven't broken anything. Everything that used to work should still work.
  • Smoke testing is done as a quick test to make sure everything looks okay before you get involved in the more vigorous testing.
Nikita G
7#
Nikita G Reply to 2009-03-04 01:48:41Z

Unit test: Verifying that particular component (i.e.,class) created or modified functions as designed. This test can be manual or automated but does not move beyond the boundary of the component.

Integration test: Verifying that the interaction of particular components function as designed. Integration tests can be performed at the unit level or the system level. These tests can be manual or automated.

Regression test: Verifying that new defects are not introduced into existing code. These tests can be manual or automated.

Depending upon your SDLC (waterfall, rup, agile, etc) particular tests may be performed in 'phases' or may all be performed, more or less, at the same time. For example, unit testing may be limited to developers who then turn the code over to testers for integration and regression testing. However another approach might have developers doing unit testing and some level of integration and regression testing (using a TDD approach along with continuous integration and automated unit and regression tests).

The tool set will depend largely on the codebase but there are many open source tools for unit testing (JUnit). HP's (mercury) QTP or Borland's Silktest are both tools for automated integration and regression testing.

AndyM
8#
AndyM Reply to 2013-09-11 03:47:51Z

A new test category I've just become aware of is the:

Canary test

A Canary test is an automated, non-destructive test that is run on a regular basis in a LIVE environment, such that if it ever fails, something really bad has happened.

Examples might be:

  • Has data that should only ever be available in DEV/TEST appeared in LIVE.
  • Has a background process failed to run
  • Can a user logon
nhfghfgsq
9#
nhfghfgsq Reply to 2013-09-17 09:59:06Z

Unit test: Verifying that particular component (i.e.,class) created or modified functions as designed. This test can be manual or automated but does not move beyond the boundary of the component.

Integration test: Verifying that the interaction of particular components function as designed. Integration tests can be performed at the unit level or the system level. These tests can be manual or automated.

Regression test: Verifying that new defects are not introduced into existing code. These tests can be manual or automated.

Depending upon your SDLC (waterfall, rup, agile, etc) particular tests may be performed in 'phases' or may all be performed, more or less, at the same time. For example, unit testing may be limited to developers who then turn the code over to testers for integration and regression testing. However another approach might have developers doing unit testing and some level of integration and regression testing (using a TDD approach along with continuous integration and automated unit and regression tests).

Jaime Gago
10#
Jaime Gago Reply to 2013-10-28 21:19:35Z

One type of test that seems to be worth mentioning in this thread is stress/performance/load tests which could be simply put as finding out the limits beyond which a certain piece of software breaks. Note that in terms of tooling it is essential to precisely determine the scope of what one proposes to stress tests from a system perspective. For instance in the case of a "web application" stress testing can include in its scope the web server application itself and so the tooling could intervene on that end. Here is a nice post about http load testing

malini
11#
malini Reply to 2014-04-26 12:02:23Z

unit test: testing of individual module or independent component in an application is known to be unit testing , the unit testing will be done by developer.

integration test: combining all the modules and testing the application to verify the communication and the data flow between the modules are working properly or not , this testing also performed by developers.

smoke test IN smoke test they check the application in shallow and wide manner, In smoke testing they check the main functionality of the application , if there is any blocker issue in the application they will report to developer team , and developing team will fix it and rectify the defect, and give it back to testing team and now testing team will check all the modules to verify tat changes made in one module will impact the other module or not. IN SMOKE TESTING the test cases are scripted

regression testing executing the same test cases repeatedly to ensure tat the unchanged module does not cause any defect. REGRESSION TESTING comes under functional testing

Nakilon
12#
Nakilon Reply to 2014-11-07 12:22:42Z
  • Integration Testing : Integration Testing is the Integrate the Another Element
  • Smoke Testing : Smoke Testing is also known as build version Testing.Smoke testing is the initial testing process exercised to check whether the software under test is ready/stable for further testing.
  • Regression Testing : Regression Testing is Reapeated Testing. Whether new software is effected in another module or not.
  • Unit Testing : It is a White box Testing .Only Developers involve in it
mohit sarsar
13#
mohit sarsar Reply to 2014-09-16 10:50:07Z

Unit Testing:- unit testing is usually done by the developers side,where as testers are partly evolved in this type of testing where testing is done unit by unit. In java Junit test cases can also be possible to test whether the written code is perfectly designed or not.

Integration Testing:- This type of testing is possible after the unit testing when all/some components are integrated.This type of testing will make sure that when components are integrated,do they affect each others working capabilities or functionalists.

Smoke Testing:- This type of testing is done at the last when system is integrated successfully and ready to go on production server. This type of testing will make sure that every important functionality from start to end is working fine and system is ready to deploy on production server.

Regression Testing:- This type of testing is important to test that unintended/unwanted defects are not present in the system when developer fixed some issues. This testing also make sure that all the bugs are successfully solved and because of that no other issues are occurred.

Nakilon
14#
Nakilon Reply to 2014-11-07 12:23:58Z

Unit testing is directed at the smallest part of the implementation possible. In java this means you are testing a single class. If the class depends on other classes these are faked.

When your test calls more than one class, its an integration test.

Full test suites can take a long time to run, so after a change many teams run some quick to complete tests to detect significant breakages. For example, you have broken the URIs to essential resources. These are the smoke tests.

Regression tests run on every build and allow you to refactor effectively by catching what you break. Any kind of test can be regression test, but I find unit tests are most helpful finding the source of fault.

Sanyal
15#
Sanyal Reply to 2015-07-28 16:36:50Z

Regression test - Is a type of SW testing where we try to cover or check around the bug Fix. the functionality around the bug fix should not get changed or altered due to the Fix provided. Issues found in such process are called as Regression Issues.

Smoke Testing : Is a kind of testing done to decide whether to accept the Build/Software for further QA testing .

Tim Castelijns
16#
Tim Castelijns Reply to 2015-09-21 09:47:08Z

Unit testing:

Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation. Unit testing is often automated but it can also be done manually.

Integration testing:

(sometimes called integration and testing, abbreviated I&T) is the phase in software testing in which individual software modules are combined and tested as a group. It occurs after unit testing and before validation testing.

System testing:

is most often the final test to verify that the system to be delivered meets the specification and its purpose.

Regression test:

after implementing new features or bug fixes, you re-test scenarios which worked in the past. Here you cover the possibility in which your new features break existing features.

Smoke Testing:

The objective is not to perform exhaustive testing, but to verify that the critical functionalities of the system is working fine. For Example a typical smoke test would be - Verify that the application launches successfully, Check that the GUI is responsive, etc.

0112
17#
0112 Reply to 2017-08-04 22:59:10Z

Answer from one of the best Websites for Software Testing Techniques:

Types of Software Testing – Complete List Click Here

It's quite a long description, I'm not going to paste it here: but it may be helpful for someone who wants to know all the testing techniques.

Hope it'll be helpful :)

Krunal
18#
Krunal Reply to 2017-07-18 12:29:27Z

Unit Testing: It always performs by developer after their development done to find out issue from their testing side before they make any requirement ready for QA.

Integration Testing: It means tester have to verify module to sub module verification when some data/function output are drive to one module to other module. Or in your system if using third party tool which using your system data for integrate.

Smoke Testing: tester performed to verify system for high-level testing and trying to find out show stopper bug before changes or code goes live.

Regression Testing: Tester performed regression for verification of existing functionality due to changes implemented in system for newly enhancement or changes in system.

Radostta
19#
Radostta Reply to 2017-11-17 11:58:04Z

Smoke and sanity testing are both performed after a software build to identify whether to start testing. Sanity may or may not be executed after smoke testing. They can be executed separately or at the same time - sanity being immediately after smoke.

Because sanity testing is more in-depth and takes more time, in most cases it is well worthed to be automated.

Smoke testing usually takes no longer than 5-30 minutes for execution. It is more general: it checks a small number of core functionalities of the whole system, in order to verify that the stability of the software is good enough for further testing and that there are no issues, blocking the run of the planned test cases.

Sanity testing is more detailed than smoke and may take from 15 minutes up to a whole day, depending on the scale of the new build. It is a more specialized type of acceptance testing, performed after progression or re-testing. It checks the core features of certain new functionalities and/or bug fixes together with some closely related to them features, in order to verify that they are functioning as to the required operational logic, before regression testing can be executed in larger scale.

Blue Clouds
20#
Blue Clouds Reply to 2017-12-09 08:45:56Z

Smoke test has been explained here already and is simple. Regression test comes under integration test.

Automated tests can be divided into just 2.

Unit test and Integration Test. (this is all that matters)

I would call use the phrase "long test"(LT) for all tests like integration test, functional test, regression test, UI test , etc. And unit test as "short test".

A LT example could be, automatically loading a web page, logging in to the account and buying a book. If the test passes it is more likely to run on live site the same way(hence the 'better sleep' reference). Long = distance between web page(start) and database(end).

And this is a great article discussing the benefits of integration testing(long test) over unit testing

Adrian Witas
21#
Adrian Witas Reply to 2018-02-11 22:25:41Z

There has been a great detail of the difference between various test techniques. That said, very little has touched on Smoke Test or Regression Test tools.

Usually, there are some frameworks coupled with the language/framework that has been used to develop the app. Having developed Angular, protractor might be a good choice, for Java cucumber or arquillian might be another choice. All in all the more languages/frameworks, the more choices you have. Or is it ?.

I have personally believed in a declarative language that fits all languages and platofrm all together for testing end to end.

Endly is very first end to end testing and automation framework that is fully declarative, it can be used for anything in any language beyound unit tests.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.319023 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO