Download testing Tools

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Software testing techniques
Testing tools
Presentation on the seminar
Kaunas University of Technology
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.
Types of testing tools
•
•
•
•
•
Unit testing tools
Model-based testing tools
Functional (GUI) testing tools
Non-functional testing tools
Code analysis 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; }
}
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);
}
}
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.
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.
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.)
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);
Model-based testing
Tools:
MaTeLo, SpecExplorer, GraphWalker…
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.
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”));
}
Functional (GUI) testing
Tools:
Abbot, AutoHotkey, CubicTest, Dogtail, FitNesse,
Linux Desktop Testing Project, Maveryx, Qaliber,
Selenium, Robotium…
Non-functional testing
Non-functional testing is the testing of a software
application for its non-functional requirements.
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
Non-functional testing
Tools:
AppLoader, IBM Rational Performance Tester,
Jmeter, LoadRunner, Apache Bench, Httpperf,
SLAMD…
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.
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.
Code analysis
Tools:
Copy/Paste detector, Sonar, Yasca, FxCop,
Gendarme, StyleCop, cppcheck, Checkstyle,
FindBugs, Hammurapi, Closure Compiler,
JSLint…
Questions?
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?