You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there,
currently I am trying to use the cypress-split plugin but I cannot manage it to work for every test.
We are using the @badeball/cypress-cucumber-preprocessor to be able to use cucumber.
The cypress config is configured like that:
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor';
import browserify from '@badeball/cypress-cucumber-preprocessor/browserify';
import { defineConfig } from 'cypress';
const { initPlugin } = require('cypress-plugin-snapshots/plugin');
const cypressSplit = require('cypress-split');
async function setupNodeEvents(on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions): Promise<Cypress.PluginConfigOptions> {
cypressSplit(on, config);
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await addCucumberPreprocessorPlugin(on, config);
initPlugin(on, config);
on(
'file:preprocessor',
browserify(config, {
typescript: require.resolve('typescript'),
}),
);
// Make sure to return the config object as it might have been modified by the plugin.
return config;
}
export default defineConfig({
e2e: {
fixturesFolder: './src/fixtures',
supportFile: 'src/support/e2e.ts',
specPattern: '**/*.feature',
video: false,
videosFolder: './cypress/videos/',
watchForFileChanges: false,
screenshotOnRunFailure: true,
screenshotsFolder: '../../dist/cypress/apps/my-portal-e2e/screenshots',
baseUrl: 'http://localhost:4201',
chromeWebSecurity: false,
viewportWidth: 1980,
viewportHeight: 1080,
requestTimeout: 10000,
experimentalRunAllSpecs: true,
retries: 4,
experimentalMemoryManagement: true,
env: {
TAGS: 'not @skip',
'cypress-plugin-snapshots': {
imageConfig: {
threshold: 0.01,
thresholdType: 'percent',
},
},
},
setupNodeEvents,
excludeSpecPattern: ['**/__snapshots__/*', '**/__image_snapshots__/*'],
},
});
The gitlab ci is configured like that:
.cypress-template:
image: cypress/base:16.14.2-slim
stage: test
tags:
- cypress
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "develop"
when: always
artifacts:
when: always
expire_in: 1 day
paths:
- apps/my-portal-e2e/cypress/screenshots/**/*.*
- apps/my-portal-e2e/cypress/videos/**/*.*
- app/my-portal-e2e/src/e2e/**/__image_snapshots__/*
cypress-portal-split:
extends: .cypress-template
parallel: 13
script:
- npm run cypress:install
- npm run e2e:portal:split
cypress-portal2-split:
extends: .cypress-template
parallel: 1
script:
- npm run cypress:install
- npm run e2e:portal2:split
Hello there,
currently I am trying to use the cypress-split plugin but I cannot manage it to work for every test.
We are using the @badeball/cypress-cucumber-preprocessor to be able to use cucumber.
The cypress config is configured like that:
The gitlab ci is configured like that:
The cucumber preprocessor rc looks like this:
In the Pipeline, half of the jobs fail:
The error is alway the same:
Somehow, the specs are not there.
What could be the problem here?
The text was updated successfully, but these errors were encountered: