Software Testing Practices

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 10

Software Testing Practices

Ari Ein Habar

Unit Testing
Definition - Unit testing is a method that tests small parts of code in order to determine if they are fit for use Unit is the smallest testable part of an application No dependency between tests cases Enables Well defined inputs, outputs and behavior

Characteristics of A good unit test


Runs fast- If the tests run time is long, they will not run often Separates or simulates limited environmental

dependencies
Test one thing at a time Tests run in any machine Clear and Understandable to others

Benefits from using Unit Tests


Unit testing enables refactoring with Safety measures Unit testing acts as a living documentation of the

system
Unit tests helps reduce effort on integration tests

Limitations of UT
Test only functionality Time Consuming Shows only presence of bugs

Need a version control system - to reflect changes


in code

Test Driven Development


Tests are written to define the functionality before the
code is written Commit Only after all tests pass (green)

Tests are considered to be more reliable because the


code coverage is better, and it runs constantly during development

The developer discovers defects immediately upon


making a change

Integration testing
Integration testing, is a method in which program units are combined and tested as groups in multiple ways Integration testing can expose problems with the connection between program components before going live

Automated Testing
Automated testing is a method in which by using a tool that runs the program being tested Enables feeding Complex and varying inputs,

outputs and behavior


No human intervention is needed The test suite runs and give a complete indication if the program's output was as expected

Benefits of Automated testing


Automated Software Testing Saves Time-Every time source code is modified

software tests should be repeated, Once created, automated tests can be run over and
over again at no additional cost.

Automated Software Testing Improves Accuracy- Every man makes mistakes during testing.

Automated Software Testing Increases Test Coverage- Automated testing increase the depth and scope of tests.

Automated Software Testing Helps Developers and Testers- Shared automated


tests can be used by developers to catch problems quickly before going live.

Good Luck!

You might also like