100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

Summary Software Testing & Verification Midterm (INFOB3STV)

Rating
-
Sold
2
Pages
19
Uploaded on
01-06-2022
Written in
2021/2022

All subjects that are discussed in the first part of the Software Testing & Verfication (INFOB3STV) course for the midterm, clearly summarized. Based on the lectures and the book Introduction to Software Testing.

Institution
Course










Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Institution
Study
Course

Document information

Summarized whole book?
No
Which chapters are summarized?
Unknown
Uploaded on
June 1, 2022
Number of pages
19
Written in
2021/2022
Type
Summary

Subjects

Content preview

STV Midterm
Unit testing 2

Graph-based Test Coverage 5

Black box testing 8
Partitioning based testing 8
Model Based Testing 9

White box testing 11
Data-flow based testing 11

Integration testing 13

Inter-class testing 14

Automated testing 16




1

,Unit testing
Testing Verifying the correctness of the program by inspecting a finite number of executions
- Pragmatic approach of verification (and have to accept that it is inherently incomplete)
- Example: determining triangle type
- TriangleType TriType(Float a, Float b, Float c) where a, b, and c are sides of a
triangle, returns the type of triangle that these three sides form
- A test could be Assert.AreEqual(Isosceles, TriType(4, 4, 1)), though
note that his only looks at the final result and not the intermediate steps
- Test/test-case: specification of a sequence of interactions along with the needed
parameters for the program, and the expected responded it should produce
- Oracle: specification of the expectation of the program’s responses

V-model
- Illustrates a typical scenario for testing levels and how they relate to software
development activities by isolating each step




- Acceptance testing is done by users/third party, the rest by developers

Unit Functions, methods, maybe even a class
- Different types of units may have different types of interactions, thus requiring different
approaches:
- Function behaviour depends only on its parameters, no side effects
- Procedure may also have side effects besides depending on its params
- Method may depend on and affect variables, possibly class variables
- Class is a collection of potentially interacting methods

Structure of test project
- A solution may contain multiple projects, including multiple test projects
- A test project is used to group related test classes
- A test class is used to group test methods
- A test method does the actual testing work, usually encoding a single test-case

Typical NUnit test class
[TestFixture]
class TriangleTest {



2

, [SetUp] // Will be run before every test
void Init() { ... }

[TearDown]
void Cleanup() { ... }

[Test]
void Test1_Triangle() { Assert.AreEqual(...) }
[Test]
void Test2_Triangle() { ... }
}


Test specification
- Usually, expected responses are determined by an existing specification, or a
specification that is elicited somehow
- Informal specification: expectation expressed in natural language
- “If a, b , c represent the sides of a triangle, Triangle() determines the type of the
triangle.”
- Formal specification: expectation expressed with boolean logic
- Pros: precise, can be turned into executable specifications, change to program
doesn’t require re-programming, allows generating test sequences/inputs
- Cons: capturing intended specification can be hard and adds additional work
- Consists of a pre-condition, method call and a post-condition
- For example, the above triangle example can be formalised to:




In-code specification
- A formal specification can be turned into code as follows (general form):
void MethodSpec(x) {
if (..pre-cond..) {
var retval = Method(x);

Assert.IsTrue(..post-cond..);
}
else // Check that method throws the expected exception when
the pre-condition is violated
Assert.Throws<expected exception>(() => Method(x));
}


3

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Suniht Universiteit Utrecht
Follow You need to be logged in order to follow users or courses
Sold
94
Member since
4 year
Number of followers
55
Documents
19
Last sold
1 day ago

3.9

13 reviews

5
7
4
2
3
2
2
0
1
2

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions