-
Notifications
You must be signed in to change notification settings - Fork 6
Tool Cypress
Roman edited this page Mar 3, 2023
·
3 revisions
This is a wrapper for running Cypress tests.
You can use one of the Run
methods to run Cypress according to your needs.
Additionally, you need to pass a CypressRunSettings
object with your desired settings.
Examples:
// Create the settings object
cypressRunSettings := >tools.CypressRunSettings{
Project: "./e2e",
E2e: true,
Browser: gttools.CypressBrowserChrome,
Specs: specsToRun,
CiBuildId: <your-unique-build-id>,
Parallel: false,
Record: false,
RecordKey: "irrelevant",
}
cypressRunSettings.OutputToConsole = true
// Run with a defined Cypress executable
err := gotaskr.Tools.Cypress.CypressRun("node_modules/.bin/cy2", cypressRunSettings)
// Run with Npx
err := gotaskr.Tools.Cypress.CypressRunWithNpx(cypressRunSettings)
// Run with Yarn
err := gotaskr.Tools.Cypress.CypressRunWitYarn(cypressRunSettings)