codeceptjs / CodeceptJS

Supercharged End 2 End Testing Framework for NodeJS
http://codecept.io
MIT License
4.11k stars 725 forks source link

run-workers not provide tests result #4420

Closed Yasuslik closed 4 months ago

Yasuslik commented 4 months ago

What are you trying to achieve?

When i run tests whith run-workers i dont have info about my tests and tests always passed

image

What do you get instead?

Provide console output if related. Use --verbose mode for more details. TypeScript Definitions provide autocompletion in Visual Studio Code and other IDEs Definitions were generated in steps.d.ts CodeceptJS v3.6.3 #StandWithUkraine Running tests in 3 workers...


nodeInfo: 18.16.0 osInfo: macOS 14.1.1 cpuInfo: (8) x64 Apple M1 Pro chromeInfo: 126.0.6478.127 edgeInfo: 120.0.2210.61 firefoxInfo: undefined safariInfo: 17.1 If you need more detailed info, just run this: npx codeceptjs info


@regression @events @article @suslik

@regression @events @article @suslik

@regression @events @article @suslik [03] ✔ The user clicked on the reaction under the article. (Not auth User) @C14112 in 4123ms ✔ The user clicked on the reaction under the article. (Not auth User) @C14112 (4128ms) [01] ✔ After clicking on the reaction, the modal window "To leave reactions you need to enter or register" was displayed. @C14230 in 4200ms ✔ After clicking on the reaction, the modal window "To leave reactions you need to enter or register" was displayed. @C14230 (4208ms) [02] ✔ The user closed the modal window: - clicked on the cross @C14231 in 4573ms ✔ The user closed the modal window: - clicked on the cross @C14231 (4575ms) [03] ✔ The user clicked “Register” on the modal window @C14235 in 3856ms ✔ The user clicked “Register” on the modal window @C14235 (3856ms) [01] ✔ The user clicked on the reaction under the article. (Auth User) @C14227 in 8401ms ✔ The user clicked on the reaction under the article. (Auth User) @C14227 (8402ms)

2 passing (14s)

[03] ✔ The user clicked on the selected reaction again, thereby canceling it. (Auth User) @C14229 in 5093ms ✔ The user clicked on the selected reaction again, thereby canceling it. (Auth User) @C14229 (5093ms)

3 passing (14s)

[02] ✔ The user changed the reaction under the article. (Auth User) @C14228 in 9051ms ✔ The user changed the reaction under the article. (Auth User) @C14228 (9051ms)

2 passing (14s)

OK | 0 passed // 33s

codeceptjs def -c config/acceptance.conf.ts -o ./; npx codeceptjs run-workers 3 -c ./config/acceptance.conf.ts --grep '@suslik' --verbose

Details

require('ts-node/register');
require('dotenv').config();

const { getBaseUrl, getCellAdminUrl } = require('@portal/qa-test-helper');

exports.config = {
  tests: './../tests/acceptance/**/**.test.ts',
  output: './../output',
  helpers: {
    Playwright: {
      url: getBaseUrl('ru'),
      restart: false,
      show: false,
      waitForNavigation: 'domcontentloaded',
      windowSize: '1366x768',
      waitForTimeout: 10000,
    },
    REST: {
      endpoint: getCellAdminUrl(),
      prettyPrintJson: true,
    },
    JSONResponse: {},
    ChaiWrapper: {
      require: 'codeceptjs-chai',
    },
    InterceptHelper: {
      require: '@portal/qa-intercept',
    },
    ResponseHelper: {
      require: '@portal/qa-response-helper',
    },
    TestHelper: {
      require: '@portal/qa-test-helper',
      hive: {
        url: process.env.HIVE_URL,
        login: process.env.HIVE_USER_LOGIN,
        password: process.env.HIVE_USER_PASSWORD,
      },
    },
  },
  mocha: {
    enabled: true,
    reporter: 'mochawesome',
    reporterOptions: {
      maxDiffSize: 50000,
      reportDir: './../output',
      reportFilename: 'report',
      quiet: true,
      json: false,
      html: true,
      overwrite: true,
      inline: true,
    },
  },
  name: 'acceptance',
  plugins: {
    retryFailedStep: {
      enabled: true,
    },
    retryTo: {
      enabled: true,
    },
    screenshotOnFail: {
      enabled: true,
    },
  },
  include: {
    loginPage: './../pages/website/login-page.ts',
    authPage: './../pages/website/authorization-page.ts',
  },
};