#testing

26 snippets tagged with #testing

typescriptbeginner

Native Test Runner and Assert

Write tests using Node.js built-in test runner and assert module — no external dependencies needed.

Best for: Unit testing without external packages

#nodejs#testing
typescriptadvanced

Dependency Injection Container

Build a lightweight DI container with singleton and transient scopes for testable Node.js applications.

Best for: Testable application architecture

#nodejs#dependency-injection
typescriptadvanced

Testing Server Components

Test Next.js server components and server actions using testing-library and mocks.

Best for: unit testing

#nextjs#testing
pythonintermediate

Pytest Fixtures and Parametrize

Reusable pytest fixtures with scope control, parametrize for data-driven tests, and temporary resources.

Best for: Unit test setup

#pytest#testing
typescriptadvanced

LLM Output Evaluation and Scoring

Evaluate LLM outputs programmatically with scoring rubrics for quality, relevance, and safety.

Best for: prompt testing

#ai#evaluation
pythonintermediate

LLM Prompt Testing Framework

Write automated tests for LLM prompts using Python assertions to detect regressions.

Best for: prompt regression testing

#testing#prompts
pythonintermediate

LLM Testing with DeepEval

Write unit tests for LLM outputs using the DeepEval framework for correctness and hallucination detection.

Best for: LLM testing

#deepeval#testing
bashintermediate

GitHub Actions Test Matrix Strategy

GitHub Actions workflow with matrix strategy to test across multiple Node versions and OS platforms.

Best for: Cross-platform compatibility testing

#github-actions#testing
yamladvanced

GitHub Actions — Advanced Matrix Strategy

Complex matrix strategies with include/exclude, fail-fast control, and dynamic matrix generation.

Best for: Cross-platform and multi-version testing

#github-actions#matrix
pythonintermediate

Data Quality Testing with Expectations

Define and run data quality expectations for automated validation in data pipelines.

Best for: Automated data quality gates in pipelines

#data-quality#testing
sqlintermediate

SQL Data Quality Checks and Assertions

Reusable SQL queries for data quality: null checks, uniqueness, referential integrity, and freshness.

Best for: Automated data quality gates in ETL pipelines

#sql#data-quality
sqlbeginner

dbt Source Freshness and Testing

Configure dbt source freshness checks and schema tests to validate upstream data pipelines.

Best for: Ensuring upstream data sources are fresh

#dbt#testing
bashbeginner

dbt Run and Test — CI/CD Pipeline Script

Bash script for running dbt build with testing, documentation generation, and failure notifications.

Best for: Automating dbt builds in CI/CD pipelines

#dbt#bash
pythonadvanced

Great Expectations Data Quality Suite

Define and run a Great Expectations validation suite to catch data quality issues early.

Best for: CI data validation

#great-expectations#data-quality
pythonbeginner

Generate Synthetic Data with Faker

Create realistic test datasets for development and testing using the Faker library.

Best for: test data generation

#faker#testing
pythonintermediate

Property-Based Testing for Data Functions

Use Hypothesis to automatically generate edge-case test data for data transformation functions.

Best for: data function testing

#hypothesis#testing
javaintermediate

JUnit 5 — Test Patterns and Assertions

Write JUnit 5 tests with assertions, lifecycle hooks, nested tests, parameterized tests, and dynamic tests.

Best for: Unit testing Java applications with JUnit 5

#java#junit
javaintermediate

Mockito — Mocking and Verification

Mock dependencies with Mockito: when/thenReturn, verify, argument captors, and spy patterns.

Best for: Testing service layers with mocked dependencies

#java#mockito
javaadvanced

Spring Boot Integration Testing

Write Spring Boot integration tests with MockMvc, test slices, TestContainers, and mock beans.

Best for: REST API endpoint verification

#spring-boot#testing
kotlinintermediate

Testing with JUnit 5 and Kotlin

Write expressive tests in Kotlin: JUnit 5, nested tests, parameterized tests, and extension functions.

Best for: Unit testing Kotlin classes and functions

#kotlin#testing
kotlinintermediate

Testing with Kotest and Assertions

Write expressive tests with Kotest: string spec, data-driven tests, property-based testing, and matchers.

Best for: Expressive Kotlin unit testing

#kotlin#testing
kotlinintermediate

Testing with MockK Framework

Mock dependencies in Kotlin tests with MockK: relaxed mocks, verify, coEvery, and slot captures.

Best for: Unit testing with mocked dependencies

#kotlin#testing
scalaintermediate

Unit Testing with ScalaTest

Write unit tests with ScalaTest: FunSuite, FlatSpec, matchers, mocking, and async testing.

Best for: Unit testing Scala code

#scala#testing
scalaintermediate

Property-Based Testing with ScalaCheck

Write property-based tests with ScalaCheck: generators, properties, shrinking, and custom Arbitrary.

Best for: Exhaustive testing with random inputs

#scala#testing
scalaintermediate

Testing with Mocks and Stubs

Write testable Scala code with trait-based mocks, stubs, and dependency substitution.

Best for: Unit testing with dependency injection

#scala#testing
scalaintermediate

Testing with Specs2 Framework

Write readable tests with specs2: acceptance specs, matchers, data tables, and mock integration.

Best for: Behavior-driven development

#scala#testing