npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hobbyfarm-e2e-testing

v1.0.7

Published

Automated testing solution to validate an instance of [HobbyFarm](https://github.com/hobbyfarm) (API + web app), the Cloud Native e-learning tool

Downloads

3

Readme

End-to-end testing solution for HobbyFarm

CI Nightly

Automated testing solution to validate HobbyFarm (API + web app), the Cloud Native e-learning platform!

Current state

This repository has been created in February 2023 and the first working version has been completed in May 2023.

The design has been documented in ADRs (Architecture Decision Record): Solution init (Feb 2023).

How to run tests

The technical solution is based on Playwright. The following setup is required in order to run the tests on a machine:

# installs NPM packages
npm install

# installs Playwright dependencies
npx playwright install --with-deps

Environment variables needs to be set to target a specific environment. Locally, you can copy .env.example to create and edit .env file that will be used to configure the tests (thanks to dotenv).

Once the setup and configuration is completed, you can run several commands:

# runs the end-to-end tests (see https://playwright.dev/docs/running-tests)
npx playwright test

# run the tests from the test browser (really cool to see & debug!)
npx playwright test --ui

# opens last HTML report run
npx playwright show-report

# opens a browser to help generate tests (see https://playwright.dev/docs/codegen for options)
npx playwright codegen

How to run acceptance tests

Acceptance testing has been written in Gherkin languages and are mapped to the code thanks to Cucumber (code)

# runs features defined in acceptance folder
npx cucumber-js

How to contribute

File organization

You can start editing files in tests folders and look at examples in samples folder. For UI testing, the PageObject pattern has been followed and code is found in src/pages. For REST API testing, code is in src/resources.

To go further you can have a look at .\playwright.config.ts (Playwright Test configuration) and Playwright documentation.

IDE

If you use Visual Studio Code, you can install the extension Playwright Test for VSCode (repository).

Libraries

Code quality

We use MegaLinter (code) to check all code from this repository. It will be automatically used in the CI pipeline but you can run it locally:

npx mega-linter-runner

You can also run specific linters:

npx eslint .

How to operate