False Positive False Negative

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Effect of an error

When an apparent failure in test is actually the application or


system performing correctly, this is termed a false positive.
Conversely, a false negative is where there is a real failure, but this is
not identified as such and the test is seen as.
When is testing started?
If we wish to identify errors through testing we need to begin testing as
soon as we begin making errors – right at the beginning of the
development process – and we need to continue testing until we are
confident that there will be no serious system failures – right at the
end of the development process.
Software failures, then, can lead to:
1. loss of time;
2. loss of business reputation;
3. Injury;
4. Death
5. Loss of money

Deciding when ‘enough is enough’


How much testing is enough, and how do we decide when to stop
testing?
We have so far decided that we cannot test everything, even if we
would wish to. We also know that every system is subject to risk of
one kind or another and that there is a level of quality that is
acceptable for a given system.
Testing is the systematic and methodical examination of a work
product using a variety of techniques, with the express intention of
attempting to show that it does not fulfil its desired or intended
purpose. This is undertaken in an environment that represents most
nearly that which will be used in live operation.

Test basis: The body of knowledge used as the basis for test analysis
and design.
Test condition: An aspect of the test basis that is relevant in order to
achieve specific test objectives.
Test case: A set of preconditions, inputs, actions (where applicable),
expected results and postconditions, developed based on test
conditions.
Test procedure: A sequence of test cases in execution order, and any
associated actions that may be required to set up the initial
pre-conditions and any wrap up activities post execution.
Principles
Testing shows the presence, not absence, of defects
Exhaustive testing is impossible
Early testing saves time and money
Defect Clustering:
○ A small number of modules or functionalities typically
contain the majority of defects. By focusing testing
efforts on these high-risk areas, testers can uncover a
significant portion of potential issues.

Pesticide Paradox:

● If the same set of tests is repeated over time, they become


less effective at finding new defects. To address this, test
cases should be regularly reviewed and updated to adapt
to the evolving nature of the software.

Testing Is Context-Dependent:

○ The effectiveness of testing depends on the context of


the project, including the requirements, technology,
and the development process being used.

Absence-of-Errors Fallacy:

○ The absence of reported defects does not necessarily


imply that the software is defect-free. It could be due
to insufficient testing or the absence of specific
conditions that trigger defects.

Testing Is a Risk-Based Activity:

Testing efforts should be focused on areas of the software that


pose the highest risk.

Testing Is Iterative:

Testing is an iterative process that involves cycles of designing,


executing, and evaluating tests.
Test Automation Complements Manual Testing:

While test automation can improve efficiency and coverage, it


should be used judiciously. Not all testing activities are suitable
for automation, and manual testing remains essential for certain
aspects, such as exploratory testing and usability testing.
Black box testing techniques

equivalence partitioning;

y boundary value analysis;

y decision table testing;

y state transition testing;


y use case testing.

Black box technique է

Համարժեք արժեքների խմբերի է բաժանում equivalent


partito
Boundary analysis

Pytest-python framework, allows write test cases(api, …)


Running pytest without mentioning a filename will run
all files of format test_*.py or *_test.py in the
current directory and subdirectories.
Pytest requires the test function names to start with
test. Function names which are not of format test* are
not considered as test functions by pytest.
Command-pytest
pytest [file_name]
Կարոզ ենք ասել որ ֆայլերը
Pytest -v -k mul
Որը mul է պարունակում
Օրինակ՝ “sum and <not> 7”
Pytest -v -m [marker name]
Test case-երը կարող ենք խմբավորել
Class Test_SUM_MY1 for grouping

PyTest:
- Install / setup / run test
- Starting With Basic Test
- File Execution
- Execute a Subset of Test Suite
- Substring Matching of Test Names
- Grouping the Tests
- Fixtures (Scopes, yeald, autouse, etc)
- Conftest.py
- Parameterizing Tests/Fixtures
- Xfail/Skip Tests
- Stop Test Suite after N Test Failures
- Run Tests in Parallel
- Test Execution Results in XML/HTML

You might also like