Download presentation
Presentation is loading. Please wait.
Published byMarvin Walters Modified over 8 years ago
1
Testing tools Jonas Minelga, IFME-0/2
2
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.
3
Types of testing tools Unit testing tools Model-based testing tools Functional (GUI) testing tools Non-functional testing tools Code analysis testing tools
4
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; } } interface Adder { int add(int a, int b); } class AdderImpl implements Adder { int add(int a, int b) { return a + b; } }
5
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); } 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); }
6
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.
7
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.
8
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.)
9
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);
10
Model-based testing Tools: MaTeLo, SpecExplorer, GraphWalker…
11
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.
12
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”)); } 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”)); }
13
Functional (GUI) testing Tools: Abbot, AutoHotkey, CubicTest, Dogtail, FitNesse, Linux Desktop Testing Project, Maveryx, Qaliber, Selenium, Robotium…
14
Non-functional testing Non-functional testing is the testing of a software application for its non-functional requirements.
15
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
16
Non-functional testing Tools: AppLoader, IBM Rational Performance Tester, Jmeter, LoadRunner, Apache Bench, Httpperf, SLAMD…
17
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.
18
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.
19
Code analysis Tools: Copy/Paste detector, Sonar, Yasca, FxCop, Gendarme, StyleCop, cppcheck, Checkstyle, FindBugs, Hammurapi, Closure Compiler, JSLint…
20
Questions?
21
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?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.