Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AVAP Unit TestingNew to Visual Studio Code? Get it now.
AVAP Unit Testing

AVAP Unit Testing

AVAP Framework

avapframework.com
|
2 installs
| (0) | Free
Editor for AVAP Unit Testing.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AVAP Unit Testing for Visual Studio Code

The AVAP Unit Testing extension for Visual Studio Code provides a complete solution for generating, configuring, and executing unit tests for AVAP code. It allows developers to validate the behavior of AVAP APIs directly from their editor, with dynamic configuration and real-time test feedback.

⚠️ Important: This extension requires a local AVAP Language Server to be running. Without it, the extension will not function.

Requirements

To function properly, the following must be in place:

  • ✅ The AVAP Dev Extensions for Visual Studio Code must be installed.
  • ✅ A local AVAP Language Server must be running and accessible.

The AVAP Language Server is responsible for:

  • Discovering AVAP endpoints.
  • Serving test configuration resources (avap://unittest/config/...).
  • Executing unit tests and returning results.

❗ If the language server is not running, no endpoints will be detected, and no tests will execute.

Support for Developers

The AVAP Unit Testing extension is compatible with vscode.dev. Additional resources and updates are available at www.avapframework.dev.

Installed Extensions

To function properly, AVAP Unit Testing requires the AVAP Dev Extensions for Visual Studio Code to be installed.

Quick start

  • Step 1. Launch your AVAP Language Server locally.
  • Step 2. Install the AVAP Dev Extensions and then the AVAP Unit Testing extension.
  • Step 3. Open your AVAP project and access the Unit Testing view in the sidebar.
  • Step 4. Select an AVAP API endpoint from the list.
  • Step 5. Click Generate Test to create a test configuration based on the AVAP code.
  • Step 6. Define input and expected output, then click Run Test.

Test Configuration and Execution

The extension supports six core testing resources that can be composed for any AVAP endpoint:

Available Test Resources

  • mockWhen – Define mock behavior for calls based on conditions.
  • stub – Override internal behavior with predefined logic or values.
  • verifyCall – Ensure specific calls were made during execution.
  • label – Organize test logic into labeled sections.
  • setVar – Set variable values before execution.
  • setPayload – Define the input payload passed into the API.

These resources are combined into a dynamic configuration that can be saved, reused, or updated when AVAP code changes.

Validation

You can match outputs using:

  • Exact values: "status": "OK"
  • Regex expressions: "id": "/^user_[0-9]+$/"

Each field is validated and results are displayed inline after execution.

Test Panel

From the Unit Testing view, you can:

  • Generate test configurations per endpoint.
  • Add or edit test resources visually.
  • Execute individual or batch tests.
  • View pass/fail results and detailed output comparisons.

Joint Context

The AVAP Unit Testing extension integrates with:

  • The active AVAP code file.
  • The test configuration and resources.
  • Any declared mock/stub/test variables.

This combined context enables accurate, contextual testing directly from your editor.

Feedback

We welcome your feedback and suggestions! Join the community at www.community.avapframework.dev to report issues or request features.

License

AVAP Unit Testing extension for Microsoft Visual Studio Code
Copyright (c) 101OBEX, CORP

All rights reserved.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft