CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

"before all" hook: codeceptjs.beforeSuite

Open xeonarno opened this issue 8 years ago • 2 comments

What are you trying to achieve?

just a simple test with a homepage_test.js This issue was closed but no solution was provided. help !!!

What do you get instead?

Provide console output if related. Use --verbose mode for more details.

Homepage --
   [1] Starting recording promises
   Emitted | suite.before ([object Object])
 > [Session] Starting singleton browser session
 ✖ "before all" hook: codeceptjs.beforeSuite in undefinedms
   Emitted | suite.after ([object Object])

Provide test source code if related on homepage_test.js


Feature('Homepage');

Scenario('test something', (I) => {

});

Details

  • CodeceptJS version:1.2.1
  • NodeJS Version:v9.7.1
  • Operating System: OSX Sierra 10.12.6
  • Protractor || WebDriverIO || Nightmare version (if related) Protractor
  • Configuration file:
{
  "tests": "./e2e/*_test.js",
  "timeout": 10000,
  "output": "./reports",
  "helpers": {
    "Protractor": {
      "url": "https://myURL.io/",
      "driver": "hosted",
      "browser": "chrome",
      "rootElement": "body",
      "allScriptsTimeout": 60000,
      "jasmineNodeOpts": {
        "showColors": true,
        "defaultTimeoutInterval": 360000
      }
    }
  },
  "include": {
    "I": "./utils/steps_file.js"
  },
  "bootstrap": false,
  "mocha": {},
  "name": "myProject"
}

xeonarno avatar Jun 13 '18 10:06 xeonarno

I found a beginning of explanation.

It's a hidden spot !

In fact, if I don't define the selenium address URL the config will use :

127.0.0.1:4444 

by default without telling it ... ok convention over configuration !

But If you didn't start the webdriver-manager :

webdriver-manager start --standalone 

the test will works but I get error like that :

"after each" hook: finalize codeceptjs for "test something" 

But my tests are void so I think it's ok.

xeonarno avatar Jun 13 '18 15:06 xeonarno

I improved the error reporting for such cases. Thanks!

DavertMik avatar Jun 25 '18 22:06 DavertMik