-
Notifications
You must be signed in to change notification settings - Fork 30
Mapping Tool Test Cases
Test ID: MAP-001
Test name: Run Mapping Tool with with valid input and valid mapping file
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input and valid mapping file, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml"
Expected Result:
- The Mapping tool will be successfully executed with the following messages:
- Mapping: Reading map file...
- Mapping: Reading map file done.
- Mapping: Reading graph file...
- Mapping: Reading graph file done.
- Mapping: Linking metrics to buildables...
- Mapping: Linking metrics to buildables done.
- Mapping: Generating input for placing...
- Mapping: Generating input for placing done.
- Output will be the default, mappingToPlacing.xml.
Test ID: MAP-002
Test name: Run Mapping Tool with valid input and invalid mapping file
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input and invalid mapping file, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m 12345.xml
Expected Result: Mapping tool will display an error message: The system couldn't find the given mapping file.
***Test ID: MAP-003
Test name: Run Mapping Tool with with invalid input and valid mapping file
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with an invalid input and valid mapping file, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java333Projects.graph -m mapping.xml
Expected Result:
- Mapping: Reading map file...
- Mapping: Reading map file done.
- Mapping: Reading graph file...
- Exception in thread "main" columbus.ColumbusException: File Modules\Java333Projects.graph not found!
Test ID: MAP-004
Test name: Run Mapping Tool with with valid input and mapping file, and with help
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input, valid mapping file and with -h parameter, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -h
Expected Result: Message on command line: CodeMetropolis Toolchain Mapping (c) University of Szeged, Department of Software Engineering Usage: java -jar mapping.jar -i -m [-o ]
***Test ID: MAP-005
Test name: Run Mapping Tool with with valid input and mapping file, and with valid output
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input, valid mapping file and with valid -o parameter, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -o Modules\Mapping_output.xml
Expected Result: The Mapping tool will be successfully executed with the following messages:
- Mapping: Reading map file...
- Mapping: Reading map file done.
- Mapping: Reading graph file...
- Mapping: Reading graph file done.
- Mapping: Linking metrics to buildables...
- Mapping: Linking metrics to buildables done.
- Mapping: Generating input for placing...
- Mapping: Generating input for placing done.
- The output will be the given output file, in Modules folder, Mapping_output.xml.
Test ID: MAP-006
Test name: Run Mapping Tool with with valid input and mapping file, and with invalid output
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input, valid mapping file and with invalid -o parameter, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -o \Mapping_output.xml"
Expected Result:
- The Mapping tool will display an error message:
- Mapping: Reading map file...
- Mapping: Reading map file done.
- Mapping: Reading graph file...
- Mapping: Reading graph file done.
- Mapping: Linking metrics to buildables...
- Mapping: Linking metrics to buildables done.
- Mapping: Generating input for placing...
- codemetropolis.toolchain.commons.cmxml.exceptions.CmxmlWriterException: javax.xml.transform.TransformerException: java.io.FileNotFoundException: g:\Mapping_output.xml (A rendszer nem találja a megadott elérési utat)
Test ID: MAP-007
Test name: Run Mapping Tool with with valid input and valid mapping file, with valid scale value.
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input and valid mapping file, and with valid scale value, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -s 1.1
Expected Result:
- The Mapping tool will be successfully executed with the following messages:
- Mapping: Reading map file...
- Mapping: Reading map file done.
- Mapping: Reading graph file...
- Mapping: Reading graph file done.
- Mapping: Linking metrics to buildables...
- Mapping: Linking metrics to buildables done.
- Mapping: Generating input for placing...
- Mapping: Generating input for placing done.
- Output will be the default, mappingToPlacing.xml.
Test ID: MAP-008
Test name: Run Mapping Tool with with valid input and valid mapping file, with invalid scale value.
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input and valid mapping file, and with invalid scale value, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -s teszt
Expected Result:
- Error: Incorrect command line arguments.
- Usage: java -jar mapping.jar -i -m [-o ]
Test ID: MAP-009
Test name: Run Mapping Tool with with valid input and valid mapping file, with too big scale value.
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input and valid mapping file, and with invalid scale value, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -s 1000000000000
Expected Result: Error: a given scale value is too big.
***Test ID: MAP-010
Test name: Run Mapping Tool with with valid input and valid mapping file, with valid nested value.
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input and valid mapping file, and with valid nested value, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -n
Expected Result:
- The Mapping tool will be successfully executed with the following messages:
- Mapping: Reading map file...
- Mapping: Reading map file done.
- Mapping: Reading graph file...
- Mapping: Reading graph file done.
- Mapping: Linking metrics to buildables...
- Mapping: Linking metrics to buildables done.
- Mapping: Generating input for placing...
- Mapping: Generating input for placing done.
- Output will be the default, mappingToPlacing.xml.
Test ID: MAP-011
Test name: Run Mapping Tool with with valid input and valid mapping file, with invalid nested value.
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input and valid mapping file, and with invalid nested value, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -n false"
Expected Result:
- The tool will display an error message:
- Error: Incorrect command line arguments.
- Usage: java -jar mapping.jar -i -m [-o ]
Test ID: MAP-012
Test name: Run Mapping Tool with with empty input and valid mapping file.
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with an empty input and valid mapping file, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i -m mapping.xml"
Expected Result:
- The tool will display an error message:
- Error: Incorrect command line arguments.
- Usage: java -jar mapping.jar -i -m [-o ]
Test ID: MAP-013
Test name: Run Mapping Tool with with valid input and empty mapping file.
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input and empty mapping file, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m
Expected Result:
- The tool will display an error message:
- Error: Incorrect command line arguments.
- Usage: java -jar mapping.jar -i -m [-o ]
Test ID: MAP-014
Test name: Run Mapping Tool with with valid input, valid mapping file and with empty output.
Precondition: -
Steps:
- Open a command line.
- Run Mapping Tool with a valid input, valid mapping file and with empty output, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -o
Expected Result:
- The tool will display an error message:
- Error: Incorrect command line arguments.
- Usage: java -jar mapping.jar -i -m [-o ]
Test ID: MAP-015
Test name: Run Mapping Tool with with valid input, valid mapping file and with empty scale.
Precondition: -
Steps:
- Open a command line.
- "Run Mapping Tool with a valid input, valid mapping file and with empty scale parameter, for example: java -jar codemetropolis-toolchain-mapping-1.3.jar -i Modules\Java3Projects.graph -m mapping.xml -s"
Expected Result:
- The tool will display an error message:
- Error: Incorrect command line arguments.
- Usage: java -jar mapping.jar -i -m [-o ]