Professional Documents
Culture Documents
Continental Learning Lab: August 2014
Continental Learning Lab: August 2014
August 2014
Why is necessary
Why do we test?
Each change made to a piece of software, each new piece of functionality, each attempt
to fix a defect, introduces the possibility of a new defect.
With each defect, the risk that the software will not fulfill it`s intended purpose increases.
Airplane still
Pilot verifies the led crashes on landing
Airplane Pilot on
landing
Deploy the landing
gear
for landing gear (landing gear was System failure
deployment not totally
deployed)
Federal crash investigators suspect that a partially closed landing-gear door may have prevented part of the main wheels of a
United Airlines jet from extending last weekend at New Jersey's Newark Liberty International Airport, resulting in a harrowing
but safe landing for 48 passengers and five crew members.
6/
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
The need for testing
7/
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
The need for testing
To discover defects
To avoid detecting problems by the final user (on later stages of the product)
To stay in business
Testing can give confidence in the quality of the software if it has few or no
defects
If the software has defects, the quality of the software system will increase
when the defects are fixed
A number of testing principles have been suggested over the past 40 years and
offer general guidelines common for all testing.
When testing follows the defined principles, the creative element of test design
and execution rivals any of the preceding software development steps.
Principle 1
Principle 2
For making picture more clear, let us take a simple example of Microsoft
Windows Calculator
Calculator ( Microsoft windows 7) accepts 16 digits. You have to check for all possibilities up
to 1+ 9999999999999999 =
Next, you should try for decimal values: 1.0+0.1= , 1.0+0.2 = and so on.
It is not enough yet, we still have to check by illegal inputs to ensure that, it will be handled
properly.
Even you achieve above inputs, still multiplication, subscription and division etc. are left.
The aim of this example is only to give idea that it is impossible to test completely a
software, even software as simple as a calculator.
Principle 3
Early testing
To find defects early, testing activities shall be started as early as possible in the
software or system development life cycle, and shall be focused on defined
objectives.
A study conducted by NIST in 2002 reports that software bugs cost the U.S. economy
$59.5 billion annually
It is commonly believed that the earlier a defect is found, the cheaper it is to fix it.
Time detected
Cost to fix a defect
Requirements Architecture Construction System test Post-release
Principle 4
Defect clustering
Testing effort shall be focused proportionally to the expected and later observed
defect density of modules. A small number of modules usually contains most of
the defects discovered during pre-release testing, or is responsible for most of
the operational failures.
This is particularly true for large systems where the complexity, size, change and
developer mistakes can impact the quality of the system and affect particular
modules.
This can give a good indication that when a defect is found in one area of the
application, chances are there are more defects in that particular area, so it is
worth investing more time to test that particular area of the application to find as
many defects as possible
Gallery
Contacts
Phone
Column2
MediaPlayer
Wifi
0 5 10 15 20 25
Principle 5
Pesticide paradox
If the same tests are repeated over and over again, eventually the same set of
test cases will no longer find any new defects. To overcome this "pesticide
paradox", test cases need to be regularly reviewed and revised, and new and
different tests need to be written to exercise different parts of the software or
system to find potentially more defects.
The Paradox of the Pesticides implies the need for specialized pesticides that are
customized to the target pest.
Insects that survive the use of pesticide are those that are more immune to the
poison than others.
If you keep on applying the same pesticide/insecticide, the insects build up resistance
and the pesticide no longer works.
Solution: Tests are regularly revisited to ensure that all functionalities of test are
covered under the requirement.
Principle 6
Word processor
No government mandatory regulations
Defects found after the release to the market, are not critical.
Conclusion
Testing practices appropriate to the first project will fail in the second
Principle 7
Absence-of-errors fallacy
Finding and fixing defects does not help if the system built is unusable and does
not fulfill the user needs and expectations.
V-Cycle model
“The system will have to remember the user and do the login
automatically”
Global variables
Connect to the DB
Data validation
Unit tests – test modules or individual units of source code, in our case we can test:
Login
Register
Shopping cart
Search
Category
Verifying the whole data flow of receiving an order, creating an invoice, saving it to
the DB and mailing it to the client.
Change the price for a product in DB and check if the GUI is updated on refresh
System tests
Add a product from a Category to the Shopping cart and place a order
Acceptance tests
Static testing
From the black box testing point of view, this involves reviewing requirements
and specifications
Test Plan
A test plan is a systematic approach to testing a system i.e. software.
The plan typically contains detailed understanding of what the eventual testing
workflow will be
Dynamic testing
Dynamic testing adopts the opposite approach and is executed while a
program is in operation
Dynamic testing involves testing the software for the input values and
output values and then are analyzed
A dynamic test, however, will only find defects in the part of the code that is
actually executed
Design
Architecture
Implementation
Unit Tests
Integration Tests
System Tests
Requirements analysis
Testing should begin in the requirements phase of the software development life
cycle.
During the design phase, testers work with developers in determining what
aspects of a design are testable and with what parameters those tests work
Test planning
Test strategy and test plan creation.
Since many activities will be carred out during testing, a plan is needed.
Test development
Test procedures, test scenarios, test cases, test scripts to use in testing software
Test execution
Testers execute the software based on the plans and test documents then report
any errors found to the development team
Test reporting
Once testing is completed, testers make the final reports on their test effort and
whether or no the software tested is ready for release
Defect retesting
Once a defect has been dealt with by the development team, it is retested by the
testing team
Regression testing
It is common to have a small test program built of a subset of tests, each
integration of new, modified or fixed software, in order to ensure that the latest
delivery has not ruined anything and that the software product as a whole is still
working correctly
Test closure
Once the test meets the exit criteria, the activities such as capturing the key
outputs, lessons learned, results, logs, documents related to the project are
archived and used as a reference for future projects
Quiz
This requirement is not well written. Why?
The alarm shall remain active for 5 seconds.
Quiz
This requirement is not well written. Why?
The alarm shall remain active for 5 seconds.
Quiz
This requirement is not well written. Why?
When primary is lost, secondary unit takes over.
Quiz
This requirement is not well written. Why?
When primary is lost, secondary unit takes over.
Is this a “must” or is this “optional”? Use words like “must” (or “shall”)
consistently
Quiz
This requirement is not well written. Why?
The system shall purge state control records and files that are older than the
retention period
Quiz
This requirement is not well written. Why?
The system shall purge state control records and files that are older than the
retention period
Quiz
This requirement is not well written. Why?
When performing calculations the software shall produce correct results.
Quiz
This requirement is not well written. Why?
When performing calculations the software shall produce correct results.
Quiz
This requirement is not well written. Why?
The output of the program shall usually be given within 10 seconds
Quiz
This requirement is not well written. Why?
The output of the program shall usually be given within 10 seconds
Quiz
Which requirement has the best form?
Quiz
Which requirement has the best form?
Quiz
Is this specification written well?
When password and user name are entered, they are validated
Quiz
Is this specification written well?
When password and user name are entered, they are validated
The system validates the user name and password that the user provided
Quiz
Is this specification written well?
Notification is sent
Quiz
Is this specification written well?
Notification is sent
Quiz
Is this specification written well?
The system usually should respond fast
Quiz
Is this specification written well?
The system usually should respond fast
The system must respond to user requests in two seconds or under for
90% of requests.
Quiz
Is this specification written well?
Because the user almost always requests a hard copy report, the
system should provide this capability on demand
Quiz
Is this specification written well?
Because the user almost always requests a hard copy report, the
system should provide this capability on demand
5. Describe one of the most relevant principle of testing that you will apply for testing
your personal mobile phone. Argument your selected principle.
67 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti