Transcript
Page 1: Software testing techniques Testing tools

Software testing techniquesSoftware testing techniques

Testing tools

Presentation on the seminar

Kaunas University of Technology

Page 2: Software testing techniques Testing tools

Why do we need testing tools?

• Testing is faster• Testing is cheaper• Testing is more effective

We get better quality software for almost the same price.

Page 3: Software testing techniques Testing tools

Types of testing tools

• Unit testing tools• Model-based testing tools• Functional (GUI) testing tools• Non-functional testing tools• Code analysis testing tools

Page 4: Software testing techniques Testing tools

Unit testing

Unit testing is a method by which individual units of source code are tested to determine if they are fit for use.

interface Adder { int add(int a, int b);

} class AdderImpl implements Adder {

int add(int a, int b) { return a + b; } }

Page 5: Software testing techniques Testing tools

Unit testing

public class TestAdder { public void testSum() {

Adder adder = new AdderImpl(); assert(adder.add(1, 1) == 2); assert(adder.add(1, 2) == 3); assert(adder.add(2, 2) == 4); assert(adder.add(0, 0) == 0); assert(adder.add(-1, -2) == -3); assert(adder.add(-1, 1) == 0); assert(adder.add(1234, 988) ==

2222); }

}

Page 6: Software testing techniques Testing tools

Unit testing

Tools:

csUnit, Nunit, NUnitASP, EMTF, CppUnit, Cput, C++test, UnitTest++, Dunit, Jtest, JUnit, TestNG, NUTester, JSUnit, QUnit, jsUnity…

Today we have unit testing tools for more than 70 programming languages.

Page 7: Software testing techniques Testing tools

Model-based testing

Model-based testing is an approach in which you define the behavior of a system in terms of actions that change the state of the system. Such a model of the system results in a well-defined Finite State Machine (FSM) which helps us to understand and predict the system’s behavior.

Page 8: Software testing techniques Testing tools

Model-based testing

Steps:

1.Build the model;

2.Generate expected inputs;

3.Generate expected outputs;

4.Run tests;

5.Compare actual outputs with expected outputs;

6.Decide on further actions (modify the model, generate more tests, stop testing and etc.)

Page 9: Software testing techniques Testing tools

Model-based testing

Advantages:•Forces detailed understanding of the system behavior;•Early bug detection (which is much cheaper);•Test suite grows with the product;•Manage the model instead of the cases (useful when features changing constantly);•Can generate endless tests (since test cases are machine generated);

Page 10: Software testing techniques Testing tools

Model-based testing

Tools:

MaTeLo, SpecExplorer, GraphWalker…

Page 11: Software testing techniques Testing tools

Functional (GUI) testing

Functional testing is a type of black box testing that bases its test cases on the specifications of the software component under test. Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered.

Page 12: Software testing techniques Testing tools

Functional (GUI) testing

public void testAddUserFail() throws Exception {

solo.sendKey(Solo.MENU); solo.clickOnText(“Add”); Assert.assertTrue(solo.searchText(“Name:”)); Assert.assertTrue(solo.searchText(“Surname:”));       solo.clickOnText(“Ok”);   Assert.assertTrue(solo.searchText(“Error”));          }

Page 13: Software testing techniques Testing tools

Functional (GUI) testing

Tools:

Abbot, AutoHotkey, CubicTest, Dogtail, FitNesse, Linux Desktop Testing Project, Maveryx, Qaliber, Selenium, Robotium…

Page 14: Software testing techniques Testing tools

Non-functional testing

Non-functional testing is the testing of a software application for its non-functional requirements.

Page 15: Software testing techniques Testing tools

Non-functional testing

Non-Functional Testing covers:•Load and Performance Testing•Ergonomics Testing•Stress & Volume Testing•Compatibility & Migration Testing•Data Conversion Testing•Security / Penetration Testing•Operational Readiness Testing•Installation Testing•Security Testing

Page 16: Software testing techniques Testing tools

Non-functional testing

Tools:

AppLoader, IBM Rational Performance Tester, Jmeter, LoadRunner, Apache Bench, Httpperf, SLAMD…

Page 17: Software testing techniques Testing tools

Code analysis

Static code analysis. A methodology of detecting errors in program code based on the programmer's reviewing the code marked by the analyzer in those places where potential errors may occur.

Page 18: Software testing techniques Testing tools

Code analysis

The earlier an error is determined, the lower is the cost of its correction. Correction of an error at the testing stage is ten times more expensive than its correction at the construction (coding) stage.

Page 19: Software testing techniques Testing tools

Code analysis

Tools:

Copy/Paste detector, Sonar, Yasca, FxCop, Gendarme, StyleCop, cppcheck, Checkstyle, FindBugs, Hammurapi, Closure Compiler, JSLint…

Page 20: Software testing techniques Testing tools

Questions?

Page 21: Software testing techniques Testing tools

Questions

• Why do we need testing tools?• List types of testing tools.• What is static code analysis?• What are the steps of model-based testing?• What non-functional testing covers?


Recommended