NE

netalertx-testing-workflow

Executes and debugs Python-based tests within the NetAlertX container.

Install

mkdir -p .claude/skills/netalertx-testing-workflow && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5860" && unzip -o skill.zip -d .claude/skills/netalertx-testing-workflow && rm skill.zip

Installs to .claude/skills/netalertx-testing-workflow

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Run and debug tests in the NetAlertX devcontainer. Use this when asked to run tests, check test failures, debug failing tests, or execute pytest.
145 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • Executes tests within container environment
  • Handles failure investigation workflows
  • Manages environment variable authentication
  • Builds project test images
  • Filters tests by status or file

How it works

It wraps test runner commands with specific Python path configurations and project-specific environment authentication helpers.

Inputs & outputs

You give it
Test file path or failure flag
You get back
Test execution results and status logs

When to use netalertx-testing-workflow

  • Run all project tests
  • Debug failing test cases
  • Investigate 403 errors in tests
  • Run specific test files

About this skill

Testing Workflow

Pre-Flight Check (MANDATORY)

Before running any tests, always check for existing failures first:

  1. Use the testFailure tool to gather current failure information
  2. Review the failures to understand what's already broken
  3. Only then proceed with test execution

Running Tests

Use VS Code's testing interface or the runTests tool with appropriate parameters:

  • To run all tests: invoke runTests without file filter
  • To run specific test file: invoke runTests with the test file path
  • To run failed tests only: invoke runTests with --lf flag

Test Location

Tests live in test/ directory. App code is under server/.

PYTHONPATH is preconfigured to include the following which should meet all needs:

  • /app # the primary location where python runs in the production system
  • /app/server # symbolic link to /wprkspaces/NetAlertX/server
  • /app/server/plugins # symbolic link to /workspaces/NetAlertX/server/plugins
  • /opt/venv/lib/pythonX.Y/site-packages
  • /workspaces/NetAlertX/test
  • /workspaces/NetAlertX/server
  • /workspaces/NetAlertX
  • /usr/lib/pythonX.Y/site-packages

Authentication in Tests

Retrieve API_TOKEN using Python (not shell):

from helper import get_setting_value
token = get_setting_value("API_TOKEN")

Troubleshooting 403 Forbidden

  1. Ensure backend is running (use devcontainer-services skill)
  2. Verify config loaded: get_setting_value("API_TOKEN") returns non-empty
  3. Re-run startup if needed (use devcontainer-setup skill)

Docker Test Image

If container changes affect tests, rebuild the test image first:

docker buildx build -t netalertx-test .

This takes ~30 seconds unless venv stage changes (~90s).

When not to use it

  • Testing outside of NetAlertX structure
  • Local machine testing without container
  • Production system debugging

Prerequisites

NetAlertX devcontainerdocker

Limitations

  • Requires the project container context
  • High setup time for initial build

How it compares

It maintains specific path and dependency mappings required for NetAlertX internal components compared to standard pytest.

Compared to similar skills

netalertx-testing-workflow side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
netalertx-testing-workflow (this skill)16moReviewIntermediate
python-testing-patterns772moReviewIntermediate
python-playground24moReviewBeginner
mflux-manual-testing22moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry