Commit b0a4266c authored by sunye's avatar sunye

Correct bad slide layout in some slides of software test lecture

parent 41261d0c
Pipeline #19719 passed with stages
in 4 minutes and 44 seconds
......@@ -71,20 +71,23 @@ The execution type:: dynamic, static
* _Dynamic Testing_ relies on the execution of the *Software Under Test* to verify whether it complies with its specification.
* This requires executing the same program a large amount of times to cover all relevant cases from the specification.
[.columns]
== In practical terms
[.columns]
--
[.col-8]
[.column.is-two-thirds]
--
* _Dynamic Testing_ consists in:
.. executing a *Script* that drives the Software into a given state
.. providing *Data* to the Software
.. executing an *Oracle* that tells whether the test *fails* or *succeeds*
* The *Script*, the *Data*, and the *Oracle* form a *Test Case*
* A suite of *Test Cases* is called a *Test Suite*
--
[.col-4]
[.column.is-one-third]
--
[plantuml, cd-test-suite, png, align=center]
....
scale 800 width
......@@ -116,12 +119,11 @@ Data "1" --* TestCase
image::dynamic-test-case.png[align=center,height=800px]
[.columns]
== Example: The *ArrayList* class
[.columns]
[.column.is-one-third]
--
[.col-4]
[plantuml, cd-array-list, png, align=center]
....
scale 400 width
......@@ -137,9 +139,9 @@ class ArrayList<T\t> {
contains(elm : T): Boolean
}
....
[.col-8]
****
--
[.column]
--
.How to test class `ArrayList`?
* What should be tested?
* How many Test Cases?
......@@ -149,7 +151,6 @@ class ArrayList<T\t> {
* name them?
* code the Test Scripts?
* code the Oracles?
****
--
== What should be tested?
......@@ -279,9 +280,6 @@ If the blocks are too complex, use auxiliary (private) methods!
== Test Script Guidelines (Cont.)
[.columns]
--
[.col-6]
.Write single flow code:
* No conditional logic or loops
* Split in to two tests rather than using “If” or “Case”
......@@ -289,7 +287,8 @@ If the blocks are too complex, use auxiliary (private) methods!
* If test logic has to be repeated, it probably means the test is too complicated.
* Call method multiple times rather than looping inside of method.
[.col-6]
== Single Flow Example
[source,java]
----
ArrayList<String> expected = new ArrayList<>();
......@@ -304,7 +303,6 @@ actual.remove("two");
assert actual.equals(expected);
----
--
== Test Script Guidelines (Cont.)
// TODO: Add examples
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment