CtrlK
BlogDocsLog inGet started
Tessl Logo

giuseppe-trisciuoglio/developer-kit

Comprehensive developer toolkit providing reusable skills for Java/Spring Boot, TypeScript/NestJS/React/Next.js, Python, PHP, AWS CloudFormation, AI/RAG, DevOps, and more.

89

Quality

89%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Risky

Do not use without reviewing

Overview
Quality
Evals
Security
Files

test-commands.mdplugins/developer-kit-core/skills/github-issue-workflow/references/

Test Commands - Comprehensive Reference

Complete test command reference for all project types and quality checks.

Test Suite Commands

JavaScript/TypeScript (Node.js)

# Detect: package.json exists
# Command:
npm test

# With coverage:
npm test -- --coverage

# Watch mode:
npm test -- --watch

# Specific test file:
npm test -- path/to/test.spec.ts

Java (Maven)

# Detect: pom.xml exists
# Command:
./mvnw clean verify

# Skip tests (not recommended):
./mvnw clean install -DskipTests

# Run specific test class:
./mvnw test -Dtest=TestClass

# Run specific test method:
./mvnw test -Dtest=TestClass#testMethod

Java (Gradle)

# Detect: build.gradle or build.gradle.kts exists
# Command:
./gradlew build

# Run tests only:
./gradlew test

# Run specific test:
./gradlew test --tests TestClass

# With coverage:
./gradlew test jacocoTestReport

Python

# Detect: pyproject.toml or setup.py exists
# Command:
python -m pytest

# With coverage:
python -m pytest --cov

# Verbose output:
python -m pytest -v

# Specific test file:
python -m pytest path/to/test_file.py

Go

# Detect: go.mod exists
# Command:
go test ./...

# With verbose output:
go test -v ./...

# With coverage:
go test -cover ./...

# Specific package:
go test ./path/to/package

PHP

# Detect: composer.json exists
# Command:
composer test

# PHPUnit (if configured):
./vendor/bin/phpunit

# With coverage:
./vendor/bin/phpunit --coverage-html coverage

Makefile

# Detect: Makefile exists
# Command:
make test

# Specific target:
make test-unit
make test-integration

Linter and Static Analysis Commands

JavaScript/TypeScript

# ESLint:
npm run lint

# TypeScript type checking:
npx tsc --noEmit

# Prettier check:
npx prettier --check .

# Prettier format:
npx prettier --write .

# Combined:
npm run lint && npx tsc --noEmit && npx prettier --check .

Java (Maven)

# Checkstyle:
./mvnw checkstyle:check

# SpotBugs:
./mvnw spotbugs:check

# PMD:
./mvnw pmd:check

# Combined:
./mvnw checkstyle:check spotbugs:check pmd:check

Java (Gradle)

# All checks:
./gradlew check

# Individual checks:
./gradlew checkstyleMain
./gradlew spotbugsMain
./gradlew pmdMain

Python

# Ruff linter:
python -m ruff check .

# Ruff formatter:
python -m ruff format --check .

# MyPy type checker:
python -m mypy .

# Combined:
python -m ruff check . && python -m mypy . && python -m ruff format --check .

Go

# Vet:
go vet ./...

# Format check:
gofmt -l .

# Lint (requires golangci-lint):
golangci-lint run

# Combined:
go vet ./... && gofmt -l .

PHP

# PHPCS:
composer lint

# PHPStan:
./vendor/bin/phpstan analyse

# Psalm:
./vendor/bin/psalm

# Combined:
composer lint && ./vendor/bin/phpstan analyse

Code Formatting Checks

JavaScript/TypeScript

# Check formatting:
npx prettier --check .

# Format files:
npx prettier --write .

# Specific directory:
npx prettier --check src/

Python

# Check formatting:
python -m ruff format --check .

# Format files:
python -m ruff format .

# Specific directory:
python -m ruff format --check src/

Go

# Check formatting:
gofmt -l .

# Format files:
gofmt -w .

# Specific directory:
gofmt -l src/

Security Scanning

JavaScript/TypeScript

# npm audit:
npm audit

# npm audit fix:
npm audit fix

# Yarn audit:
yarn audit

# Snyk (if installed):
npx snyk test

Python

# Safety:
safety check

# Bandit:
bandit -r .

# Pip-audit:
pip-audit

Dependency Check

# OWASP Dependency Check (if installed):
dependency-check --scan .

Multi-Language Detection Script

#!/bin/bash
# Comprehensive test runner for Phase 5

# Detect and run the FULL test suite
if [ -f "package.json" ]; then
    echo "Detected Node.js project"
    npm test 2>&1 || true
elif [ -f "pom.xml" ]; then
    echo "Detected Maven project"
    ./mvnw clean verify 2>&1 || true
elif [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
    echo "Detected Gradle project"
    ./gradlew build 2>&1 || true
elif [ -f "pyproject.toml" ] || [ -f "setup.py" ]; then
    echo "Detected Python project"
    python -m pytest 2>&1 || true
elif [ -f "go.mod" ]; then
    echo "Detected Go project"
    go test ./... 2>&1 || true
elif [ -f "composer.json" ]; then
    echo "Detected PHP project"
    composer test 2>&1 || true
elif [ -f "Makefile" ]; then
    echo "Detected Makefile project"
    make test 2>&1 || true
else
    echo "No known test configuration found"
    exit 1
fi

Multi-Language Linter Script

#!/bin/bash
# Comprehensive linter for Phase 5

# Detect and run ALL available linters/formatters
if [ -f "package.json" ]; then
    echo "Detected Node.js project"
    npm run lint 2>&1 || true
    npx tsc --noEmit 2>&1 || true  # TypeScript type checking
elif [ -f "pom.xml" ]; then
    echo "Detected Maven project"
    ./mvnw checkstyle:check 2>&1 || true
    ./mvnw spotbugs:check 2>&1 || true
elif [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
    echo "Detected Gradle project"
    ./gradlew check 2>&1 || true
elif [ -f "pyproject.toml" ]; then
    echo "Detected Python project"
    python -m ruff check . 2>&1 || true
    python -m mypy . 2>&1 || true
elif [ -f "go.mod" ]; then
    echo "Detected Go project"
    go vet ./... 2>&1 || true
elif [ -f "composer.json" ]; then
    echo "Detected PHP project"
    composer lint 2>&1 || true
fi

Multi-Language Format Check Script

#!/bin/bash
# Code formatting check for Phase 5

# Detect and run formatting checks
if [ -f "package.json" ]; then
    echo "Checking Node.js project formatting"
    npx prettier --check . 2>&1 || true
elif [ -f "pyproject.toml" ]; then
    echo "Checking Python project formatting"
    python -m ruff format --check . 2>&1 || true
elif [ -f "go.mod" ]; then
    echo "Checking Go project formatting"
    gofmt -l . 2>&1 || true
fi

Test Result Interpretation

Exit Codes

Exit CodeMeaningAction
0All tests passedProceed to next phase
1-4Tests failedFix failures, re-run
127Command not foundInstall test framework
130Interrupted (Ctrl+C)Re-run tests

Common Test Failures

Failure TypeCommon CauseFix
Unit test failureLogic errorFix code
Compilation errorSyntax errorFix syntax
Import errorMissing dependencyInstall dependency
Type errorType mismatchFix types
Lint errorStyle violationFix style

Continuous Integration Integration

GitHub Actions

name: Test
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
      - run: npm ci
      - run: npm test

GitLab CI

test:
  script:
    - npm ci
    - npm test

Jenkins

pipeline {
    stages {
        stage('Test') {
            steps {
                sh 'npm test'
            }
        }
    }
}

Best Practices

  1. Run full test suite - Don't skip tests
  2. Check coverage - Ensure adequate test coverage
  3. Fix failures immediately - Don't accumulate test debt
  4. Keep tests fast - Use mocks for slow operations
  5. Test in isolation - Each test should be independent
  6. Use descriptive names - Test names should explain what they test
  7. Test edge cases - Don't just test the happy path
  8. Mock external dependencies - Don't rely on external services

plugins

CHANGELOG.md

context7.json

CONTRIBUTING.md

README_CN.md

README_ES.md

README_IT.md

README.md

tessl.json

tile.json