Skip to content

Functional testing framework to automate OpenSearch-Dashboards

License

Notifications You must be signed in to change notification settings

tianleh/monterey

 
 

Repository files navigation

Monterey

Functional testing framework to automate OpenSearch Dashboards.

Getting Started

Monterey uses Cypress, which you can install using the installation guide.

Monterey also uses ESLint, which you can install using the installation guide. This project requires you to install the Cypress ESLint Plugin for Cypress-specific rules.

Running tests

Before running any tests, make sure that both OpenSearch and OpenSearch Dashboards are running. The demo test expects the OpenSearch Dashboards server base path to be stored as the baseUrl variable in the cypress.json file (more details here). By default, the baseUrl is set to http://localhost:5601.

By default, Cypress test files are located in cypress/integration. More details about the Cypress folder structure can be found here.

Cypress Test Runner

To run tests through the Cypress Test Runner, open Cypress using one of the commands listed in the installation guide, such as npx cypress open. Once the Cypress Test Runner is open, all tests stored in cypress/integration should be visible and organized by directory. After you select the desired browser, click on the test you want to run and a new browser window will open running the test.

CLI

Given that Cypress was installed as an npm module, you can also run Cypress in the command line, as is detailed here. To run a specific test, an example command you can use is npx cypress run --spec "cypress/integration/path/to/test.js".

ESLint

To run ESLint on the entire project, you can use either npx eslint . or yarn run eslint .. There are currently two configuration files you can add or modify rules in: .eslintrc.js in the root directory for global rules, and .eslintrc.json in the cypress directory for Cypress-specific rules.

To have ESLint fix issues that it detects and can resolve, you can add the --fix flag to the end of the run commands (more details here).

About

Functional testing framework to automate OpenSearch-Dashboards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%