Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bacon-automation-testing

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bacon-automation-testing

This is a testing project for **ba:con** application.

  • 1.0.0
  • unpublished
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Automation testing project for BAConnected

This is a testing project for ba:con application.

The project is build on Playwright framework.

It provides a set of automated tests that can be run to ensure the functionality of the application remains intact after changes have been made. This testing project is a package of the ba:con monorepo and should be run on the connection with the main app.

The project is developing on TypeScript, has own architecture and tasks in the application development and delivery life cycle.

What is Playwright?

Playwright is a Node.js library for automating the Chromium, Firefox, WebKit browsers, and Electron apps with a single API. It enables to write reliable, fast, and maintainable tests for the applications using JavaScript or TypeScript.

Table of Contents

  • Folders
  • Installation
  • Tests
  • Report
  • CI
  • Resources

Folders

Inside the pw-e2e-autotests package folder are collected all necessary files, components and elements of the testing framework and testing flows spec files.

bs-autotests/
├── .github/
│ └── workflows/
│     └── playwright.yml   <!-- GitHub Actions template -->
├── src/
│ ├── pageObjects/         <!-- PageObjects and components files -->
│     ├── components/
│     └── page files
│ └── tests/               <!-- folders with the code for different levels of testing included to the project as sub-projects -->
│     ├── api/
│     ├── commonActions/   <!-- actions and fixtures that can be used in different parts of the project -->
│     ├── e2e/
│     ├── functional/
│     └── helpers/         <!-- helpers -->
├── .eslintrc.json         <!-- eslint configuration and rules -->
├── package.json           <!-- nodejs configuration file -->
├── playwright.config.ts   <!-- project base configuration -->
├── README
└── tsconfig.json

Installation

This project is part of a monorepo. To use this project in the context of the larger repository, please follow these steps:

  • Clone the repository
  • Navigate to the root of the repository
  • Run pnpm install to install all dependencies for all packages (follow the installation instructions for the root project)
  • Execute pnpm build:all and pnpm start:browser command for build and run the application on the localhost:3000
  • Navigate to this package's directory and open a new terminal window
  • Run pnpm t to run all testing scripts of the package

You could run the project in a standalone mode. In this mode you can not run the project in local environment, cause the main application is not build and run locally.

  • Navigate to this package's directory and open a new terminal window
  • Run pnpm install to install all dependencies for all package
  • Run ENVR=qa pnpm test:ui-e2e to run the testing project

Tests

The testing project includes some sub-projects that can be run by the executing the scripts.

Available sub-projects: test:ui-e2e

The all tests could be run in different environments by call the environment as the process.env variable ENVR. By changing the environment you change the baseUrlfor running the tests

Available environments:

local - run the tests on http://localhost:3000

qa - run the tests on https://qa.bsn.cloud/

By default local is selected.

For example, for running tests on the local environment, execute the command pnpm test:ui-e2e.

For running the tests on the qa environment, execute the command ENVR=qa pnpm test:ui-e2e

For running the test in different modes, could be used the keys.

--headed run tests in headed browsers. Useful for debugging.

--debug run tests with Playwright Inspector.

--grep <grep> only run tests matching this regular expression.

--list List all the tests, but do not run them

--workers <number> the maximum number of concurrent worker processes that run in parallel.

For example when you need to start the tests in headed mode in qa environment execute

ENVR=qa pnpm test:ui-e2e --headed

In case you need to be sure the local host is run you can run additional script pretest that wait for the localhost

pnpm pretest && pnpm test:ui-e2e

Report

After each execution the list reporter is shown on the terminal.

But If you need to compile and run more deep and full html reporter,

after tests execution run the command

pnpm report to open the reporter in the browser.

CI

Under construction

Resources

https://playwright.dev/docs/intro

FAQs

Package last updated on 16 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc