Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
5 changes: 4 additions & 1 deletion .github/workflows/run-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,11 @@ jobs:
echo 'Activating Vcast ${{ matrix.version }}'
echo "VECTORCAST_DIR=$RELEASE_DIR" >> $GITHUB_ENV
echo "PATH=$RELEASE_DIR:$PATH" >> $GITHUB_ENV
USE_VCAST_24=$([ "$(head -n1 "$RELEASE_DIR/DATA/tool_version.txt" | grep -oE '^[0-9]+')" -ge 24 ] && echo "True" || echo "False")
TOOL_VERSION=$(head -n1 "$RELEASE_DIR/DATA/tool_version.txt" | grep -oE '^[0-9]+')
USE_VCAST_24=$([ "$TOOL_VERSION" -ge 24 ] && echo "True" || echo "False")
USE_VCAST_25=$([ "$TOOL_VERSION" -ge 25 ] && echo "True" || echo "False")
echo "USE_VCAST_24=$USE_VCAST_24" >> $GITHUB_ENV
echo "USE_VCAST_25=$USE_VCAST_25" >> $GITHUB_ENV
shell: bash

- name: Load hidden env vars
Expand Down
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 x number 2

![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 @@ -246,7 +246,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 @@ -311,7 +312,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 @@ -321,22 +323,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 @@ -941,12 +947,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 @@ -1203,19 +1209,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 @@ -1225,12 +1236,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 @@ -1322,9 +1328,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 @@ -1334,7 +1338,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