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.zipInstalls 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.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
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:
- Use the
testFailuretool to gather current failure information - Review the failures to understand what's already broken
- 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
--lfflag
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
- Ensure backend is running (use devcontainer-services skill)
- Verify config loaded:
get_setting_value("API_TOKEN")returns non-empty - 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
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.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| netalertx-testing-workflow (this skill) | 1 | 6mo | Review | Intermediate |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| python-playground | 2 | 4mo | Review | Beginner |
| mflux-manual-testing | 2 | 2mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by netalertx
View all by netalertx →You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
python-playground
pydantic
Run and test Python code in a dedicated playground directory. Use when you need to execute Python scripts, test code snippets, investigate CPython behavior, or experiment with Python without affecting the main codebase.
mflux-manual-testing
filipstrand
Manually validate mflux CLIs by exercising the changed paths and reviewing output images/artifacts.
examples-auto-run
openai
Run python examples in auto mode with logging, rerun helpers, and background control.
extract-fuzzer-repro
noir-lang
Extract a Noir reproduction project from fuzzer failure logs in GitHub Actions. Use when a CI fuzzer test fails and you need to create a local reproduction.
klingai-known-pitfalls
jeremylongshore
Manage avoid common mistakes when using Kling AI. Use when troubleshooting issues or learning best practices to prevent problems. Trigger with phrases like 'klingai pitfalls', 'kling ai mistakes', 'klingai gotchas', 'klingai best practices'.