# User Guide for "classificationtreeviewer"

Version: classificationtreeviewer v0.1.14

The "classificationtreeviewer" is an extension for Visual Studio Code to generate Classification tree in SVG format.

# Table of contents

- Introduction
  - Software Testing
  - Classification Tree Method
  - Classification Tree Editor
  - Who can benefit from extension
- Prerequisites
- Getting Started
  - Installation from Local System
  - Classification Tree Viewer
  - Rules and Limitations for writing XML files
- Extension Usage

# Introduction

## Software Testing

The systematic test is an inevitable part of the verification and validation process for software. Software Testing is a method to check whether the actual software product matches expected requirements and to ensure that the software product is defect free. The most important prerequisite for a thorough software test is the design of relevant test cases,since they determine the kind and scope of the test.

## Classification Tree Method

The classification tree method is a special technique for test design, as it is used in different areas of software development and supports any type of system under test. Classification trees support certain black-box test techniques by enabling a graphical representation of the data space to be created which applies to test the object. The data is organized into classifications and classes.

The classification tree method consists of two major steps such as:

- Specification of the system under test (Classifications) and their corresponding classes
- Combination of different classes from all classifications into testcases.

## Classification Tree Editor

This classification Tree method can be applied using pen and paper which can be a tedious and time-consuming affair. To solve this issue we come up with a software tool.

The "classificationtreeviewer" a software tool implementing the classification tree method. The "classificationtreeviewer" is a simple extension that, together with Visual Studio Code, greatly simplifies and assists this process.

In classificationtreeviewer extension, the user can generate a Classification tree in SVG format based on the valid entries scenario.xml and classification.xml files. How to write these XML files and their limitations are discussed in subsequent sections.

## Who can benefit from extension

- Test Managers
- Software Tester

# Prerequisites

The minimum requirements for running the "classificationtreeviewer" extension are listed below:

- Visual Studio Code
- Operating System (Linux/Windows) to install VS Code

The "classificationtreeviewer" is already been tested for below VS Code Version and Operating System.

- Visual Studio Code version : 1.57.1
- Linux Mint : 19.2

# Getting Started

## Installation from Local System

1. Launch Visual Studio Code on local system.
2. Click on Extensions icon or press CTRL+SHIFT+X then Extensions window will open.

3. Go to "..." and click on "Install from VSIX..."

4. Navigate to where you saved the plug-in and select the corresponding VSIX-File

5. Once Installation is successful then user can see below tab.

## Classification Tree Viewer

The classification tree Viewer is based on the classification tree method and supports systematic and efficient test case determination for black-box testing. The two main phases of the classification-tree method – design of Classifications and their corresponding classes and Combination of different classes from all classifications into test cases.

When using the classification-tree method, the most important source of information for the tester is the functional specification of the given test object. So while using this tool user should provide a couple of xml files as an input to the classification-tree Viewer. These files should explain the scenarios along with the test cases.

The below example shows how to use the classification tree method with the xml files.

Classification.xml:

- In this file, the user needs to define classes (parents) and their characteristics (children) based on the Test object.

For example, the shape, the color, and the size are the classes. Then classification based on the shape can be rectangle and circle and so on.

- These classes and their characteristics will be displayed at the top of the classification tree.

    <?xml version="1.0" encoding="UTF-8"?>
    <Classification>
       <Class name = "shape" >
       <Characteristic>rectangle</Characteristic>
       <Characteristic>circle</Characteristic>
        </Class>
       <Class name = "color">

       <Characteristic>yellow</Characteristic>
                <Characteristic>red</Characteristic>
        </Class>
       <Class name = "size" >
       <Characteristic>medium</Characteristic>
       <Characteristic>big</Characteristic>
        </Class>
    </Classification>

Scenario.xml:

- In this file, the user needs to define various test cases. These test cases are connected to the characteristics which are already defined in the Classification.xml file.

For example, we have a tag called Testcase and named as 'Testcase-1'. Inside every Testcase tag, users can include different scenarios (characteristics).

- This combination of scenarios and test cases will be displayed as a dot in the classification tree.

    <?xml version="1.0" encoding="UTF-8"?>
    <Testcases>
     <Testcase name='Testcase-1'>
       <shape>rectangle</shape>
       <color>red</color>
       <size>medium</size>
     </Testcase >
     <Testcase name='Testcase-2'>
       <color>red</color>
       <shape>rectangle</shape>
       <size>big</size>
     </Testcase>
     <Testcase name='Testcase-3'>
       <shape>rectangle</shape>
       <color>red</color>
       <size>medium</size>
     </Testcase >
     <Testcase name='Testcase-4'>
       <color>red</color>
       <shape>rectangle</shape>
       <size>big</size>
     </Testcase>
     <Testcase name='Testcase-5'>
       <shape>rectangle</shape>
       <color>red</color>
       <size>medium</size>
     </Testcase >
     <Testcase name='Testcase-6'>
       <color>red</color>
       <shape>circle</shape>
       <size>big</size>
     </Testcase>
    </Testcases>

## Rules and Limitations for writing XML files

For both the Classification.xml file XSD grammar has already been defined and the XSD for Scenario.xml is created based on the user's Classification.xml. So the user should follow the below rules and limitations while writing the xml files. If the user fails to follow the below rules then the classification tree would not be generated and the server would throw an error.

### Case sensitivity

The XML tags in Classification.xml and Scenario.xml are case-sensitive with the current version of the classification tree script. Please find the rules which should be followed while writing the xml files.

Classification.xml

- <Classification> - The first letter should be upper-case and all other letters should be lower-case.
- <Class name = "Name" > - The first letter of "Class" should be upper-case and all other letters should be lower-case. The "Class" name attribute can be any numbers, signs, letters(upper-case and lower-case), or combination of all of them, however, the user should use the same name while writing the Scenario.xml file.
- <Characteristic>text - The first letter of "Characteristic" should be upper-case and all other letters should be of lower-case. The "Characteristic" text can be any numbers, signs, letters(upper-case and lower-case), or combination of all of them, however, the user should use the same text while writing the Scenario.xml file.

Scenario.xml

- <Testcases> - The first letter should be upper-case and all other letters should be lower-case.
- <Testcase name='Testcase-1'> - The first letter of "Testcase" should be upper-case and all other letters should be of lower-case. The "Testcase" name attribute can be any numbers, signs, letters(upper-case and lower-case), or combination of all of them.
- <Name>text</Name> - The "Class" and "Characteristic" names should be the same as it's defined in Classification.xml.

### Unique class/parent names

1. The "Class" names in the "classification.xml" should be unique.
2. No two parents in the classification tree should have the same name.

### Unique characteristic/child names

1. The "Characteristic" names in the "classification.xml" should be unique within the same parent. However, the same value can be used in different parents.
2. No two children belonging to a parent can have the same name.

### Characteristic/Child selection

1. Two children from the same parent cannot be selected for the same test-case. Only one or none can be selected.

# Extension Usage

After successful installation of the extension, "classificationtreeviewer" is ready for usage.

1. To generate a classification tree, user should use valid scenario.xml and classification.xml files.
2. Open these two files in the same window but separate tabs of Visual Studio code.
3. Press CTRL+SHIFT+P on keyboard and select "ClassificationTree:Show Classification Tree".

4. Classification tree will be shown in the separate tab of VS Code as a SVG image.
5. Users can pan, zoom in, and zoom out in generated classification tree in VS Code.
6. Users can click on Nodes (dots) or Testcase Names to highlight the text inside the Scenario.xml file in VS Code.
7. Press CTRL+SHIFT+P on keyboard and select "ClassificationTree:Save Classification Tree as JPEG/SVG" to export tree to a file.

8. When saving tree as svg or jpg on linux add proper extension to a filename.