Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/simonberner/testcontainers-nodejs-example

An example project showing how to use Testcontainers in Node.js for Integrationtests
https://github.com/simonberner/testcontainers-nodejs-example

cloud-native-testing docker-container docker-image integration-testing postgres-container testcontainers

Last synced: 4 days ago
JSON representation

An example project showing how to use Testcontainers in Node.js for Integrationtests

Awesome Lists containing this project

README

        

# Testcontainers Node.js Example

[![Testcontainers nodejs example](https://github.com/simonberner/testcontainers-nodejs-example/actions/workflows/ci.yml/badge.svg)](https://github.com/simonberner/testcontainers-nodejs-example/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/simonberner/testcontainers-nodejs-example/blob/main/LICENSE)

## About

- [Getting Started](https://testcontainers.com/getting-started/)
- [Getting Started with Node.js](https://testcontainers.com/guides/getting-started-with-testcontainers-for-nodejs/)

## Containers

For running containers, we have the following options:

- Use Docker Desktop to run the containers locally
- Use [Testcontainers Desktop App](https://testcontainers.com/desktop/) to run containers locally (embedded runtime) or in the Testcontainers cloud (300min for free)
- Use [GitHub Actions to run a Testcontainer](https://www.atomicjar.com/2023/06/running-testcontainers-tests-using-github-actions/)

## Testcontainers Cloud

- [Your Account Dashboard](https://app.testcontainers.cloud)

## GitHub Actions

This project contains a [GitHub Action](https://github.com/simonberner/testcontainers-nodejs-example/actions) which runs the Tests (of course in a Testcontainer) when pushing/merging to main.

## Resources

- [Enable reusable containers](https://testcontainers.com/guides/simple-local-development-with-testcontainers-desktop/#_enable_reusable_containers_to_speed_up_the_development)

### Playwright

- [Playwright module for Testcontainers](https://github.com/javierlopezdeancos/testcontainers-node-playwright)
- [Playwright Docker](https://playwright.dev/docs/docker)
- [Playwright Tags](https://mcr.microsoft.com/en-us/product/playwright/tags)

## Credits

- The project is based on [this guide](https://testcontainers.com/guides/getting-started-with-testcontainers-for-nodejs/)