Skip to content

Codeceptjs exit process after tests #2573

Closed
@code1x1

Description

@code1x1

What are you trying to achieve?

Running codeceptjs with normal end if tests failed.
I dont need the tests reports.
I'm fine if the process just shutdown normally so the test server can handle the return value of the test script.

What do you get instead?

Codeceptjs runs all tests and printing an end result with successful/failed tests.
But the process doesnt stop. I have to manually shutdown the process
If all tests passed codeceptjs process exit normally.
If a test failed the codeceptjs process just prints the error log and waits for the user to end the process.
Cant use on CI Script because the server must kill the process.

FAIL | 55 passed, 14 failed // 22m

Details

package.json

{
  "name": "robotinterface",
  "version": "2.1.0",
  "author": "xxx",
  "scripts": {
     "test:e2e:selenium": "npm run build-version && codeceptjs run --config test/codecept.conf.chromedriver.js",
  }
}
  • CodeceptJS version: 2.6.10
  • NodeJS Version: v12.16.3
  • Operating System: Debian Linux ws-xxx 4.19.0-10-amd64 Typos #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux
  • chromedriver: 85.0.0
  • Configuration file:
exports.config = {
    tests: './e2e/**/*_test.js',
    output: './test-reports',
    timeout: 10000,
    helpers: {
        REST: {
            endpoint: "http://localhost/api/",
            defaultHeaders: {
                'Content-Type': 'application/json',
                'Accept': 'application/json',
            },
        },
        WebDriver: {
            // base url inside selenoid container
            url: 'http://localhost',
            // selenoid settings
            host: 'localhost',
            protocol: 'http',
            port: 9515,
            path: '/',
            browser: 'chrome',
            smartWait: 5000,
            desiredCapabilities: {
                chromeOptions: {
                    args: ["--disable-gpu", "--no-sandbox"]
                }
            }
        },
        DbHelper: {
            require: '../node_modules/codeceptjs-dbhelper'
        }
    },
    plugins: {
        allure: {
            enabled: false
        },
        screenshotOnFail: {
            enabled: false
        }
    },
    include: {
        I: './steps_file.js'
    },
    bootstrap: null,
    mocha: {},
    name: 'robotinterface'
}

Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions