Comments (2)
@debosmita-29 Could you point to the exact integration steps that you do locally or share a link to a sample where this integration works out of the box, for us to be able to reproduce it on our end?
from browserstack-cypress-cli.
Hi @sourav-kundu!
I am installing a npm package in dev dependencies
"@reportportal/agent-js-cucumber": "^5.0.2",
"@reportportal/agent-js-cypress": "^5.0.2",
I have added this plugin @reportportal/agent-js-cypress/lib/plugin
to our cypress/plugins/index.ts file like this
`///
const browserify = require('@cypress/browserify-preprocessor');
const cucumber = require('cypress-cucumber-preprocessor').default;
const resolve = require('resolve');
const fs = require('fs');
const pdf = require('pdf-parse');
const { isFileExist } = require('cy-verify-downloads');
const registerReportPortalPlugin = require('@reportportal/agent-js-cypress/lib/plugin');
module.exports = (on, config) => {
registerReportPortalPlugin(on, config);
const updatedConfig = {
...config,
reporterOptions: {
...config.reporterOptions,
token: process.env.ReportPortalToken
}
};
};
module.exports = on => {
on('file:preprocessor', cucumber());
};
module.exports = (on, config) => {
const options = {
...browserify.defaultOptions,
typescript: resolve.sync('typescript', { baseDir: config.projectRoot })
};`
Moreover, I am importing this library in our custom commands here require('@reportportal/agent-js-cypress/lib/commands/reportPortalCommands');
I am creating a reportPortal config in the root of our project relative to cypress.json and browserstack.json
{ "token": "${rp.token}", "endpoint": "${rp.endpoint}/api/v1", "launch": "${rp.launch}", "project": "${rp.your_project}", "takeScreenshot": "onFailure", "description": "Awesome launch description.", "attributes": [ { "key": "launchAttributeKey", "value": "launchAttributeValue" } ], "mode": "DEFAULT", "debug": false, "restClientConfig": { "timeout": 0 } }
In cypress.json I am adding the reporterOptions as
"reporterOptions": { "reporterEnabled": ["@reportportal/agent-js-cypress"], "reportportalAgentJsCypressReporterOptions": { "endpoint": "http://ech-10-157-151-162.mastercard.int:8080/api/v1", "token": "c001e2b2-1db0-4a67-8888-e538d5a7dbe7", "launch": "debosmita.roysaha_TEST_CYPRESS", "project": "cera", "description": "Testing ReportPortal Integration with Cypress", "isLaunchMergeRequired": false, "debug": true } },
Similarly, I am pointing my browserstack.json to the dev dependency
{ "browsers": [ { "browser": "chrome", "os": "Windows 10", "versions": ["88"] }, { "browser": "chrome", "os": "OS X Catalina", "versions": ["88"] }, { "browser": "firefox", "os": "Windows 10", "versions": ["88"] }, { "browser": "edge", "os": "Windows 10", "versions": ["88"] } ], "run_settings": { "cypress_config_file": "./cypress.json", "project_name": "Expense-Management-UI", "build_name": "Expense-Management-e2e", "cypress_version": "7", "system_env_vars": ["ReportPortalEndpoint", "ReportPortalToken", "ReportPortalProject"], "specs": ["cypress/integration/**/*.feature"], "exclude": [ "cypress/integration/approver-e2e/approver-list-page-accessibility.feature", "cypress/integration/cardholder-e2e/cardholder-list-page-accessbility.feature", "cypress/integration/smoke-test.feature", "cypress/integration/cardholder-e2e/cardholder-readonly-expenses.feature" ], "downloads": ["./results"], "parallels": "4", "npm_dependencies": { "@cypress/browserify-preprocessor": "3.0.1", "@types/cucumber": "6.0.1", "@types/cypress-cucumber-preprocessor": "4.0.0", "axe-core": "^4.1.4", "cypress": "^7.5.0", "cypress-axe": "^0.12.2", "cypress-cucumber-preprocessor": "4.0.1", "cypress-mochawesome-reporter": "1.3.0", "ts-node": "~5.0.1", "@cucumber/cucumber": "7.0.0", "cypress-file-upload": "^5.0.8", "cypress-localstorage-commands": "^1.4.1", "cucumber": "6.0.5", "resolve": "1.20.0", "cypress-multi-reporters": "^1.5.0", "cypress-plugin-tab": "^1.0.5", "pdf-parse": "^1.1.1", "cy-verify-downloads": "0.0.5", "@reportportal/agent-js-cypress": "^5.0.2" }, "package_config_options": { "cypress-cucumber-preprocessor": { "nonGlobalStepDefinitions": true } } }, "connection_settings": { "local": false, "local_identifier": null }, "disable_usage_reporting": false, "browserstack.debug": "true", "browserstack.console": "info" }
from browserstack-cypress-cli.
Related Issues (20)
- Firefox not running on latest for windows 10 HOT 3
- Cypress no longer supports cypress.json HOT 5
- 1.18.0 contains breaking changes HOT 5
- 1.18.0 version - support for running tagged scenarios supported in Cypress 10
- 1.18.0 - Cypress config file not accepting cypress.config.ts HOT 2
- Cypress 10 config file imports not working HOT 1
- Cannot find module 'cypress', Cypress v10, cypress.config.js HOT 3
- Recursion creating tests.zip when home_directory is defined
- Error and warning when using `init` command HOT 3
- `got` security vulnerability
- Peer dependency missing for mocha reporters but cannot install Mocha
- Dependancy is getting installed as a devDependancy? HOT 4
- Use alternative for request package HOT 4
- add support for Cypress component testing
- Message stating: "Sorry, you have been blocked" on any version after 1.23.1 HOT 1
- When a run is started then all files in the project are removed HOT 4
- Local testing fails when testObservability added to e2e.js
- npm ERR! 503 on browserstack side HOT 4
- geoLocation feature states it doesn't work with browserstack local , when browserstack local is not being used.
- browserstack local is set to null but local testing through BrowserStack is not connected HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browserstack-cypress-cli.