netalertx-testing-workflow

Run and debug pytest-based NetAlertX tests inside the devcontainer.

6.9k|426|Updated Dec 23, 2021
One-click install
npx skills add https://github.com/netalertx/NetAlertX --skill netalertx-testing-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: netalertx-testing-workflow
Source: https://github.com/netalertx/NetAlertX/tree/main/.github/skills/testing-workflow
Command: npx skills add https://github.com/netalertx/NetAlertX --skill netalertx-testing-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines running and debugging tests inside the NetAlertX development container, ensuring consistent results and faster feedback during development.

Core Features & Use Cases

  • Pre-Flight Check (MANDATORY): Use the testFailure tool to gather current failure information, review failures, and prepare for test execution.
  • Flexible Test Execution: Run all tests, a specific test file, or only previously failing tests using the runTests interface.
  • Test Location & Environment Context: Tests reside in test/ and the app code is under server/. The Python path is preconfigured to include critical directories to ensure tests run predictably.

Use Case: When a test fails during a PR, reproduce and fix it by running targeted tests inside the devcontainer.

Quick Start

Start the devcontainer, then run tests using the runTests commands described above.

Frequently Asked Questions about netalertx-testing-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run pytest tests inside a devcontainer?

Run pytest tests inside the NetAlertX devcontainer using the runTests interface. Tests are located in the test/ directory, and the Python path is preconfigured to include critical directories, ensuring predictable execution within the isolated container environment.

Can I debug failing tests in VSCode with a devcontainer setup?

Yes. Start the devcontainer in VSCode, use the testFailure tool to gather current failures, then run targeted tests via runTests to reproduce and fix issues with full debugging context in the container.

How do I validate a PR by running all tests in the development container?

Use the runTests interface to execute all tests from the test/ directory inside the devcontainer. The testFailure tool provides pre-flight failure information, enabling comprehensive PR validation before merge.

What's the best way to rerun only previously failing tests?

The testFailure tool gathers current test failures, then runTests lets you execute only those previously failing tests. This accelerates debugging by isolating problematic cases without running the full test suite.

Do I need specific pytest configuration to run tests in a devcontainer?

The devcontainer includes pytest-based tests in the test/ directory with preconfigured PYTHONPATH mappings pointing to server/ and other critical directories, so tests run without manual path configuration.

Why should I run tests inside the devcontainer instead of locally?

Running tests inside the devcontainer ensures consistent results across environments, isolates dependencies, and eliminates "works on my machine" issues during PR validation and local debugging.