software testing - knowledgetester.files.wordpress.com · software testing, a research perspective...
TRANSCRIPT
![Page 1: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/1.jpg)
SOFTWARE TESTING
P R A C T I C A L
A W O R K S H O P B Y
![Page 2: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/2.jpg)
{ }3 Automated Testing
![Page 3: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/3.jpg)
BREAKING THE MISSION
1 Software Test Automation
2 How to Automate?
3 Hands-on maneuvering of x-unit tools
4 Implications of Automation
![Page 4: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/4.jpg)
Test Automation
• Software Test Automation
• Controls test execution comparing actual and expected
outcomes
• Software Tester
• writes test scripts and executes with another
software to test the software
• Automated tests once developed, can be run repeatedly
http://www.tutorialspoint.com/software_testing/
![Page 5: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/5.jpg)
Rationale for Test Automation • Manual execution of test plans for regression testing is laborious and time
consuming.
• Test automation is handy for products with long maintenance life
• It can test the application from performance, load and stress point of view.
• Saves time and money compared to error-prone manual testing.
• Improvises test accuracy, coverage and productivity.
• Continuous Integration Testing
![Page 6: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/6.jpg)
What to Automate???
Choosing an automation tool
Creating a testing infrastructure for automation
Designing of test cases
Development of scripts
Execution of Scripts
Analysis of Results
Sharing the results with team Maintenance of Scripts
![Page 7: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/7.jpg)
Automation Tools• Different tools with respective features are there:
• API Testing
• Junit , Nunit
• GoogleTest
• Visual Studio Test Suite
• GUI Testing
• SilkTest
• TestComplete
• Performance Testing
• LoadRunner
• WebLoad
![Page 8: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/8.jpg)
NUnit
• NUnit is a unit testing framework for the .NET Language
• NUnit promotes the idea of "first testing then coding“
• NUnit is an open source framework which is used for
writing & running tests
• Provides annotations, assertions and test runners
![Page 9: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/9.jpg)
Environment for NUnit• Microsoft Visual Studio 2010
• .NET 4.0
• NUnit 2.6.0
![Page 10: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/10.jpg)
xUnit Design
Code to Test
Test Code
Test Runner
![Page 11: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/11.jpg)
Unit Tests in NUnit
• Unit Test is code that ensures another part of code (method) works as
expected.
• Unit tests can be written using a test framework such as Nunit.
• Unit test can be characterized with a known input and an expected output.
• Input corresponds to pre-condition and expected output corresponds to post-
condition.
• Each requirement may have two test cases: positive and negative ones.
![Page 12: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/12.jpg)
Writing Tests using NUnit
• Let’s write our first test……..
![Page 13: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/13.jpg)
Automating Adder Application
• Application: Adder application which takes
two 2-digit no.s and displays the sum.
? 2
? 3
5
![Page 14: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/14.jpg)
Adder Application Test Scenarios -I
![Page 15: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/15.jpg)
Adder Application Test Scenarios -II
![Page 16: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/16.jpg)
NUnit Features• Assertions
• Equal, Null, True [with respective vice versa]
• Annotations of Nunit• [Test]
• [Test Fixture]
• [SetUp] - before each test method is called
• [Teardown] - after each test method is run
• [TestFixtureSetUp] - performed once prior to executing all tests in fixture
• [TestFixtureTearDown] - performed once after all tests are completed
• [ExpectedException]
• [Ignore()]
![Page 17: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/17.jpg)
Parameterized Tests
• Help in running the same tests over and over again
using different values
• Nunit offers the same feature via[TestCase(12,3,4)]
[TestCase(12,2,6)]
[TestCase(12,4,3)]
public void DivideTest(int n, int d, int q)
{
Assert.AreEqual( q, n / d );
}
![Page 18: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/18.jpg)
Generating Test Documentation[TestFixture, Description("Fixture description")]
public class SomeTests
{
[Test, Description("Test description here")]
public void DocTest()
{
/* ... */
}
}
![Page 19: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/19.jpg)
Do and Don’t of Test Automation• Smoke Testing
• Run with every build to make go/no-go decision on deeper testing.
• Regression Testing • Assures that a change, bug fixes or new functionality , did not introduce new bugs
• Data Driven Testing • Testing the operations with their related data sets in a framework
• Exception or Negative Testing • Forcing error conditions in the system.
• Functional Testing • Testing that operations perform as expected for relatively stable application
• Testing on different Operating Systems/Environments
• Repetitive tasks
![Page 20: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/20.jpg)
Do and Don’t of Test Automation
• Exploratory testing
• Usability testing
• Documentation Testing
• Graphics Testing
• For Features which are under changes/unstable
![Page 21: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/21.jpg)
Software Testing, A research Perspective
• Automated Tools for Reliability calculation of Critical system
• Test Case Generation for Regression testing
• Test Case prioritization technique
• Software testing in offshore culture with agile models
• Testing of e-Governance applications.
![Page 22: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/22.jpg)
END OF UNIT 3
![Page 23: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/23.jpg)
{ }4 Unit
Exploratory Testing
![Page 24: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/24.jpg)
Learning
Find bugs
Find/Execute
Tests
Photo from: http://blog.kevineikenberry.com/leadership-supervisory-skills/leadership-and-juggling-the-unlikely-lessons/
![Page 25: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/25.jpg)
• Week 1: “We are learning the system”
• Week 2: “We are learning the system”
• Week 3: “We are designing test cases”
• Week 4: “We are finalizing test cases”
• Week 5: “We are running tests”
• Week 6: “We are finding bugs”
TYPICAL TESTING STATUS
![Page 26: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/26.jpg)
Exploratory testing is
simultaneous learning, test
case design and execution.“ “
![Page 27: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/27.jpg)
Exploratory Testing
Charter
![Page 28: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/28.jpg)
{ }5 Exercise
Exploratory Testing in action!
![Page 29: SOFTWARE TESTING - knowledgetester.files.wordpress.com · Software Testing, A research Perspective • Automated Tools for Reliability calculation of Critical system • Test Case](https://reader034.vdocuments.net/reader034/viewer/2022051811/601e4287ae4d7f77aa5db123/html5/thumbnails/29.jpg)
END OF UNIT 4