Converter Tool Test Cases - codemetropolis/CodeMetropolis GitHub Wiki


Test ID: CON-001

Test name: Run Converter Tool with valid input file

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input, for example: java -jar converter.jar -i Modules\Modules.graph

Expected Result:

  • The Converter tool will be successfully executed with the following messages:
    ⋅⋅ Converter: Converting input to CDF format...
    ⋅⋅ Converter: Converting input to CDF format done.
    ⋅⋅ Converter: Printing CDF document...
    ⋅⋅ Converter: Printing CDF document done.

Test ID: CON-002

Test name: Run Converter Tool with invalid input file

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with an invalid input file, for example: java -jar converter.jar -i g:\Modules\Modules.graph

Expected Result: Converter tool will display an error message: Error: An error has occurred while converting to CDF format. For more information please check the log file.


Test ID: CON-003

Test name: Run Converter Tool with valid input and with help

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input and with -h parameter, for example: java -jar converter.jar -i Modules\Modules.graph -h

Expected Result:

  • CodeMetropolis CDF Converter (c) University of Szeged, Department of Software Engineering
  • Usage: java -jar converter.jar -i <input> -o [<outputFile>]

Test ID: CON-004

Test name: Run Converter Tool with valid input and with valid output

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input and with valid -o parameter, for example: java -jar converter.jar -i Modules\Modules.graph -o Modules\Converter_output.xml

Expected Result:

  • The Converter tool will be successfully executed with the following messages:
    ⋅⋅ Converter: Converting input to CDF format...
    ⋅⋅ Converter: Converting input to CDF format done.
    ⋅⋅ Converter: Printing CDF document...
    ⋅⋅ Converter: Printing CDF document done.
  • The output XML will be generated to the given path with the given name.

Test ID: CON-005

Test name: Run Converter Tool with valid input file, and with invalid output

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input and with invalid -o parameter, for example: java -jar converter.jar -i Modules\Modules.graph -o g:\Modules\Converter_output.xml

Expected Result: The Converter tool will display an error message: Error: An error has occurred while converting to CDF format. For more information please check the log file.


Test ID: CON-006

Test name: Run Converter Tool with empty input value.

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with an empty input, for example: java -jar converter.jar -i

Expected Result:

  • The tool will display an error message:
    ⋅⋅ Error: Incorrect command line arguments.
    ⋅⋅ Usage: java -jar converter.jar -i <input> -o [<outputFile>]

Test ID: CON-007

Test name: Run Converter Tool with valid input and with empty output.

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input and with empty output, for example: java -jar converter.jar -i Modules\Mapping_output.xml -o

Expected Result:

  • The tool will display an error message:
    ⋅⋅ Error: Incorrect command line arguments.
    ⋅⋅ Usage: java -jar converter.jar -i <input> -o [<outputFile>]

Test ID: CON-008

Test name: Run Converter Tool with valid input and valid type

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input and valid type for example: java -jar converter.jar -t sonarqube -i http://10.6.13.7:9000/api/

Expected Result:

  • The tool will generate the CDF file successful:
    -- Converter: Converting input to CDF format...
    -- Converter: Converting input to CDF format done.
    -- Converter: Printing CDF document...
    -- Converter: Printing CDF document done.

Test ID: CON-009

Test name: Run Converter Tool with valid input, valid type and valid parameter

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input, valid type and valid parameter for example: java -jar converter.jar -t sonarqube -i http://10.6.13.7:9000/api/ -p projects=log4j

Expected Result:

  • The tool will generate the CDF file successful: -- Converter: Converting input to CDF format...
    -- Converter: Converting input to CDF format done.
    -- Converter: Printing CDF document...
    -- Converter: Printing CDF document done.

Test ID: CON-010

Test name: Run Converter Tool with invalid input, valid type and valid parameter

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with an invalid input, valid type and valid parameter for example: java -jar converter.jar -t sonarqube -i http://10.6.13.7:9000/apitest/ -p projects=log4j

Expected Result:

  • The tool will display an error message:
    -- Converter: Converting input to CDF format...
    -- Error: An error has occurred while converting to CDF format. For more information please check the log file.

Test ID: CON-011

Test name: Run Converter Tool with valid input, invalid type and valid parameter

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input, invalid type and valid parameter for example: java -jar converter.jar -t sonarqubetest -i http://10.6.13.7:9000/api/ -p projects=log4j

Expected Result:

  • The tool will display an error message:
    -- Error: Converter with the given identifier does not exist.

Test ID: CON-012

Test name: Run Converter Tool with valid input, valid type and invalid parameter

Precondition: Input graph file is available. Steps:

  • Open a command line.
  • Run Converter Tool with a valid input, valid type and invalid paramter for example: java -jar converter.jar -t sonarqube -i http://10.6.13.7:9000/api/ -p projects=log4j,test

Expected Result:

  • The tool will display an error message:
    -- Converter: Converting input to CDF format...
    -- Error: An error has occurred while converting to CDF format. For more information please check the log file.

Test ID: CON-013

Test name: Run Converter Tool with valid input, valid type and empty parameter

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input, valid type and empty paramter for example: java -jar converter.jar -t sonarqube -i http://10.6.13.7:9000/api/ -p

Expected Result:

  • The tool will display an error message:
    -- Incorrect command line arguments.
    -- Usage: java -jar converter.jar -i <input> -o <outputFile>

Test ID: CON-014

Test name: Run Converter Tool with valid input, empty type and valid parameter

Precondition: Input graph file is available.

Steps:

  • Open a command line.
  • Run Converter Tool with a valid input, valid type and empty paramter for example: java -jar converter.jar -t -i http://10.6.13.7:9000/api/ -p projects=log4j

Expected Result:

  • The tool will display an error message:
    -- Incorrect command line arguments.
    -- Usage: java -jar converter.jar -i <input> -o <outputFile>
⚠️ **GitHub.com Fallback** ⚠️