Software Development Process 14 | Category Partition Case Study
Software Development Process 14 | Category Partition Case Study

- Configure the TSLgenerator
- Download the TSL generator for Mac OS from this link.
- Move the file to the
/usr/local/bin/
directory
$ sudo cp <dir>/TSLgenerator-mac /usr/local/bin/
- Go to
/usr/local/bin/
directory
$ cd /usr/local/bin/
- Change the permission mode to
$ sudo chmod +x TSLgenerator-mac ./TSLgenerator-mac
- Go to the root directory
$ cd ~
- Check if it works
$ TSLgenerator-mac --manpage
2. Generate Test Cases by a Given TSL File
Suppose we have the following TSL file named cp-example.txt
. You can download it from here.
# Input string
Length:
0. [property zerovalue]
1.
size - 1.
size + 1.
size*2.
size*2 - 1.
size*2 + 1.
maxint.
Content:
alphanumeric characters. [if !zerovalue]
special characters. [if !zerovalue]
spaces. [if !zerovalue]
# Input size
Value:
0.
>0.
<0. [error]
maxint. [single]
Now, let’s try this file out through the TSLgenerator
,
- Reports the number of test frames that would be generated without actually producing them,
$ TSLgenerator-mac -c cp-example.txt
...
46 test frames generated
Write test frames to cp-example.txt.tsl (y/n)? n
- Output the result to stdout
$ TSLgenerator-mac -s cp-example.txt
...
Test Case 1 ...
...
- Output the result to a file named
<filename>.TSL
at the file directory
$ TSLgenerator-mac cp-example.txt
- Output the result to a specific file
TestCases.TSL
at the file directory
$ TSLgenerator-mac cp-example.txt -o TestCases.TSL
- Checkout the result
$ diff TestCases.TSL cp-example.txt.TSL
$ more TestCases.TSL
...
q
3. Start of Part I
- Create a directory called
IndividualProject
in the root
$ mkdir IndividualProject
- Create a
catpart.txt
file in theIndividualProject
directory
$ cd IndividualProject/
$ touch catpart.txt
- Implement the TSL file
catpart.txt
- Run it by
TSLgenerator-mac
and make sure we have 60 to 90 test cases
$ TSLgenerator-mac catpart.txt
- Commit and push to GitHub.
4. Start of Part II
- Implement all the test cases by JUnit tests
- Commit and push to GitHub