Kyiv Quality Assurance Day 2019
ГАННА КАПЛУН
«Automatic test data generation»
Телеграм канал: wwww.t.me/goqameetup
Фейсбук сторінці: www.fb.com/goqaevent
Сайт: www.kyiv.qaday.org
8. Generating Random Java Unit Tests with Randoop
Create a file myclasses.txt that lists the names of the classes under test:
java.util.Collections
java.util.TreeSet
and invoke Randoop as follows:
java -classpath $(RANDOOP_JAR) randoop.main.Main gentests --
classlist=myclasses.txt --time-limit=60
Randoop creates two different main test suites, in classes ErrorTest and
RegressionTest. Compile and run the tests.
All of the tests in ErrorTest will fail, and all of the tests in RegressionTest will pass.
9. Search-Based Tests with EvoSuite
1. What is the class under test?
2. What is the classpath where it can find the bytecode of the class under test and its
dependencies?
$EVOSUITE -class <ClassName> -projectCP <ClassPath>
Compile and run the tests.
Defining coverage type:
$EVOSUITE -class <ClassName> -projectCP <ClassPath> -criterion branch
10. Combinatorial Testing with PICT
Modelling:
BROWSER: IE, Firefox, Chrome, Opera
LANG: en, ru, ua
OS: win, linux, android
{BROWSER, LANG, OS} @ 1
IF [OS] = "linux" THEN [BROWSER] <> "IE";
Results:
IE ua win
Firefox en win
Opera ua linux
Chrome ru android