Week 3 & 4 Flashcards
(46 cards)
What is software testing
process of evaluating a software solution to ensure it behaves as expected
What is a bug
a bug or defect is a fault of either errors in software or hardware causing a system to fail
why do we test
Finding defects
ensuring quality
validating requirements
improving user experience
With proper testing can we ensure no bugs
Nah bro, shit isn’t that simple
can never be 100% but using proper testing methodology we can get close.
What is Test Driven Development
TDD is a development approach where test are written before any implementation of code.
First plan how you can verify you results meets a goal before any UML , source code etc.
what is the cycle involved in TDD
Red green refactor cycle
red = write a failing test, it will fail initially because of no code.
green = implement minimal code to pass the test
refactor = improve design, readability, maintainability etc while making tests cases still pass.
Which methodology does TDD fall under
It is iterative
after code is refactored, cycle repeats adding more test cases
TDD pros
improved code quality - write modular and readable code
reduced bugs - continuously testing and catching early
faster feedback - rapid feedback and address issues faster
better documentation - tests serve as documentation by showing intended behaviour and examples of usage
wie se testcase
particular choice of input and expected output
whats a test
finite collection of test cases
What is white box testing
Testing the internal structure, design and code
done by dev team - need to understand the code and algorithms
What is black box testing
testing the system from perspective of end users
done by end users
so we cannot completely test systems, so how do we test.
basically that correct behaviour on critical parts represent correct behaviour on untested parts.
is acceptance tests white or black? hehe
its black box
don’t need to understand working of code
What are the broad testing seen in a logical organisation of testing
Unit testing
Integration testing
system testing
Unit testing?
smallest possible parts of a system are tested individually and independently
white
what is integration testing
Testing how components of a system interact with each other
white
what is system testing and its 4 applications
System testing involves testing the entire system
white
Functional testing
Quality testing - non functional stuff
black
Acceptance testing
Installation testing - works when deployed
what is coverage
helps us measure the degree of which the software program is tested
Test coverage - specification testing like acceptance tests
Code coverage - testing code like unit tests
Do all tests weigh the same
No, testing can be prioritised because some tests can likely reveal more faults than others
What are some testing techniques to achieving high coverage
Black
equivalence testing
boundary testing
white
control flow testing
state based testing
what is equivalence testing
dividing possible inputs into equivalence groups such that the program is expected to behave the same with inputs from the same group
we can do this because we assume we dont have shit programmers like muzzi that hard code for inputs. So mistakes likely affect a whole class of input values
e,g. input must be a 4 digit so we split < > = 4
we have valid and invalid groups
what is boundary testing
special case of equivalence testing where we test the boundary values of ranges.
e.g we code for mark between 0 and 100 but input like 101 cooks us.
what is control flow testing
we draw flow graphs representing the logic of the code
nodes = statements
edges = transitions between statements
these graphs help us measure coverage