Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ tsconfig_test.json
# <— unignore webview assets
!src/manage/webviews/html/**
!src/manage/webviews/css/**
!src/manage/webviews/webviewScripts/**
!src/manage/webviews/webviewScripts/**
!src/requirements/webviews/css/**
!src/requirements/webviews/webviewScripts/**
19 changes: 7 additions & 12 deletions docs/reqs2x/reqs2x_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ Remove any existing versions of the VectorCAST VS-Code extension.


### VS Code Extensions
1. Install the **Excel Viewer** extension (`GrapeCity.gc-excelviewer`) to view/edit Excel sheets directly in VS Code (optional). Alternatively, use MS Excel to view/edit Excel sheets.
2. Install the **VectorCAST Text Explorer** VS-Code extension from the Microsoft Marketplace.
1. Install the **VectorCAST Text Explorer** VS-Code extension from the Microsoft Marketplace.

### Configuration
1. Activate the extension: Press `Ctrl+Shift+P`, search for **Vectorcast Test Explorer**, and press `Enter`.
Expand Down Expand Up @@ -94,21 +93,18 @@ Remove any existing versions of the VectorCAST VS-Code extension.

## 2. Generating Tests from Requirements

The demo release includes an Excel file with requirements and requirements-to-code traceability.
The demo release ships with requirements including requirements-to-code traceability. To use them, import them into the environment which will set up a requirements gateway (RGW). The RGW is the single source of truth — the extension reads from and writes to it directly.

![Reqs2x demo requirements](./screenshots/VectorCAST_Reqs2x_demo_requirements.png)



### Initial Setup
1. Click the **Flask icon** (Test Explorer) on the left sidebar to show the environment tree.
2. Right-click `TUTORIAL_C` and select **VectorCAST -> Show Requirements**. The requirements webview will appear.
3. Right-click `TUTORIAL_C` and select **VectorCAST -> Populate RGW from Requirements**.
* *Note: This creates a requirements gateway and populates it from the Excel sheet. Wait for the notification (approx. 3-5 seconds).*
* If you do not have the requirements-to-code traceability for a function, Reqs2x will generate it automatically with your approval.
2. Right-click `TUTORIAL_C` and select **VectorCAST -> Import Requirements**. Choose the file `reqs-TUTORIAL_C/reqs.xlsx`. This will load the requirements into the environment.
2. Right-click `TUTORIAL_C` and select **VectorCAST -> Show Requirements**. The requirements webview will appear, rendered directly from the RGW.
![Reqs2x demo show requirements](./screenshots/VectorCAST_Reqs2x_show_requirements.png)
![Reqs2x demo requirements webview](./screenshots/VectorCAST_Reqs2x_requirements_webview.png)
![Reqs2x demo populate RGW](./screenshots/VectorCAST_Reqs2x_populate_rgw.png)

### Test Generation
1. Right-click `TUTORIAL_C` and select **VectorCAST -> Generate Tests from Requirements**.
Expand Down Expand Up @@ -143,12 +139,11 @@ The demo release includes an Excel file with requirements and requirements-to-co


1. **Modify requirement**:
* Open `reqs.xlsx` using the Excel Viewer.
* Find `FR27` (Add Included Dessert).
* Edit the requirement directly in the requirements gateway (RGW) in the Requirements view. Open it by selecting ``VectorCAST -> Show Requirements`.
* Find `FR27` (Add Included Dessert).
* Change the free dessert for `steak, caesar salad and mixed drink` from `pie` to `cake`.
* Change the free dessert for `lobster, green salad and wine` from `cake` to `pie`.
* Save (`Ctrl+S`) and close the tab.
* Right-click `TUTORIAL_C` and select **VectorCAST -> Populate RGW from Requirements** to push the change to the requirements gateway. You will be prompted to accept replacing the old requirements gateway with the new one.
* Save the change. The extension always reads from the RGW, so no further sync step is required.

2. **Update tests**:
* In Test Explorer, find the `Add_Included_Dessert` node.
Expand Down
55 changes: 29 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@
{
"command": "vectorcastTestExplorer.generateRequirements",
"category": "VectorCAST Test Explorer",
"title": "Generate Requirements"
"title": "Generate Requirements",
"enablement": "testId not in vectorcastTestExplorer.vcastRequirementsAvailable"
},
{
"command": "vectorcastTestExplorer.insertBasisPathTestsFromEditor",
Expand Down Expand Up @@ -307,7 +308,8 @@
{
"command": "vectorcastTestExplorer.generateTestsFromRequirements",
"category": "VectorCAST Test Explorer",
"title": "Generate Tests from Requirements"
"title": "Generate Tests from Requirements",
"enablement": "testId in vectorcastTestExplorer.vcastRequirementsAvailable"
},
{
"command": "vectorcastTestExplorer.viewMCDCReport",
Expand All @@ -317,22 +319,26 @@
{
"command": "vectorcastTestExplorer.showRequirements",
"category": "VectorCAST Test Explorer",
"title": "Show Requirements"
"title": "Show Requirements",
"enablement": "testId in vectorcastTestExplorer.vcastRequirementsAvailable"
},
{
"command": "vectorcastTestExplorer.removeRequirements",
"category": "VectorCAST Test Explorer",
"title": "Remove Requirements"
"title": "Remove Requirements",
"enablement": "testId in vectorcastTestExplorer.vcastRequirementsAvailable"
},
{
"command": "vectorcastTestExplorer.importRequirementsFromGateway",
"command": "vectorcastTestExplorer.importRequirements",
"category": "VectorCAST Test Explorer",
"title": "Import Requirements from Gateway"
"title": "Import Requirements",
"enablement": "testId not in vectorcastTestExplorer.vcastRequirementsAvailable"
},
{
"command": "vectorcastTestExplorer.populateRequirementsGateway",
"command": "vectorcastTestExplorer.exportRequirements",
"category": "VectorCAST Test Explorer",
"title": "Populate RGW from Requirements"
"title": "Export Requirements",
"enablement": "testId not in vectorcastTestExplorer.vcastEnviroList || testId in vectorcastTestExplorer.vcastRequirementsAvailable"
},
{
"command": "vectorcastTestExplorer.testLLMConfiguration",
Expand Down Expand Up @@ -927,12 +933,12 @@
"when": "never"
},
{
"command": "vectorcastTestExplorer.importRequirementsFromGateway",
"when": "never"
"command": "vectorcastTestExplorer.importRequirements",
"when": "vectorcastTestExplorer.reqs2xFeatureEnabled"
},
{
"command": "vectorcastTestExplorer.populateRequirementsGateway",
"when": "never"
"command": "vectorcastTestExplorer.exportRequirements",
"when": "vectorcastTestExplorer.reqs2xFeatureEnabled"
},
{
"command": "vectorcastTestExplorer.testLLMConfiguration",
Expand Down Expand Up @@ -1184,19 +1190,24 @@
"when": "testId in vectorcastTestExplorer.globalProjectCompilers"
},
{
"command": "vectorcastTestExplorer.importRequirementsFromGateway",
"command": "vectorcastTestExplorer.generateRequirements",
"group": "vcast@8",
"when": "testId =~ /^vcast:.*$/ && testId in vectorcastTestExplorer.vcastEnviroList && vectorcastTestExplorer.reqs2xFeatureEnabled && testId not in vectorcastTestExplorer.vcastRequirementsAvailable && vectorcastTestExplorer.generateRequirementsEnabled"
"when": "testId =~ /^vcast:[^|]+$/ && testId in vectorcastTestExplorer.vcastEnviroList && vectorcastTestExplorer.reqs2xFeatureEnabled"
},
{
"command": "vectorcastTestExplorer.generateRequirements",
"command": "vectorcastTestExplorer.importRequirements",
"group": "vcast@8",
"when": "testId =~ /^vcast:.*$/ && testId in vectorcastTestExplorer.vcastEnviroList && vectorcastTestExplorer.reqs2xFeatureEnabled && testId not in vectorcastTestExplorer.vcastRequirementsAvailable && vectorcastTestExplorer.generateRequirementsEnabled"
"when": "testId =~ /^vcast:[^|]+$/ && testId in vectorcastTestExplorer.vcastEnviroList && vectorcastTestExplorer.reqs2xFeatureEnabled"
},
{
"command": "vectorcastTestExplorer.showRequirements",
"group": "vcast@9",
"when": "testId =~ /^vcast:.*$/ && testId in vectorcastTestExplorer.vcastEnviroList && vectorcastTestExplorer.reqs2xFeatureEnabled && testId in vectorcastTestExplorer.vcastRequirementsAvailable && vectorcastTestExplorer.generateRequirementsEnabled"
"when": "testId =~ /^vcast:[^|]+$/ && testId in vectorcastTestExplorer.vcastEnviroList && vectorcastTestExplorer.reqs2xFeatureEnabled"
},
{
"command": "vectorcastTestExplorer.exportRequirements",
"group": "vcast@9",
"when": "testId =~ /^vcast:[^|]+$/ && testId in vectorcastTestExplorer.vcastEnviroList && vectorcastTestExplorer.reqs2xFeatureEnabled"
},
{
"command": "vectorcastTestExplorer.generateTestsFromRequirements",
Expand All @@ -1206,12 +1217,7 @@
{
"command": "vectorcastTestExplorer.removeRequirements",
"group": "vcast@9",
"when": "testId =~ /^vcast:.*$/ && vectorcastTestExplorer.reqs2xFeatureEnabled && testId in vectorcastTestExplorer.vcastRequirementsAvailable && vectorcastTestExplorer.generateRequirementsEnabled"
},
{
"command": "vectorcastTestExplorer.populateRequirementsGateway",
"group": "vcast@9",
"when": "testId =~ /^vcast:.*$/ && vectorcastTestExplorer.reqs2xFeatureEnabled && testId in vectorcastTestExplorer.vcastRequirementsAvailable && vectorcastTestExplorer.generateRequirementsEnabled"
"when": "testId =~ /^vcast:[^|]+$/ && vectorcastTestExplorer.reqs2xFeatureEnabled"
},
{
"command": "vectorcastTestExplorer.viewResults",
Expand Down Expand Up @@ -1303,9 +1309,7 @@
"dependencies": {
"@vscode/vsce": "^2.32.0",
"axios": "^1.7.7",
"convert-excel-to-json": "^1.7.0",
"crc-32": "^1.2.0",
"csv-parse": "^5.6.0",
"glob": "^7.1.7",
"hasbin": "^1.2.3",
"jsonc-parser": "^3.2.1",
Expand All @@ -1315,7 +1319,6 @@
"tslib": "^1.9.3",
"vscode-languageclient": "^5.2.1",
"vscode-languageserver": "^5.2.1",
"xlsx": "^0.18.5",
"xo": "^0.58.0"
},
"extensionDependencies": [],
Expand Down
Loading
Loading