intern 'Runner' reporter causes errors on Saucelabs, but not 'Console' - javascript

Using requirejs as the loader, tests run on Browserstack just fine, however when I try on SauceLabs I get the following error:
Fatal error during pre-execution stage
Error: Load timeout for modules: intern/main!object, intern/chai!_unnormalized2, intern/chai!expect_unnormalized3, angularAMD, angularMocks...
requirejs.org/docs/errors.html#timeout
at makeError <.../require.js:184:17>
at checkLoaded <.../require.js:860:23> at <.../require.js:892:25>
It seems switching to the 'Console' reporter instead of 'Runner' fixes the problem - why is this?
I'm using intern-runner to start the tests, so should 'Runner' not be the most appropriate choice?

Related

Error when trying to run any Cypress test

I've installed Cypress according to the cypress docs. After opening Cypress and selecting a test to run, I instantly get the following error:
**Title:** Error running plugin
Message: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (C:\Users\metin\Desktop\Programming\School\Typescript\From JS to TS\cypress\plugins\index.js)
Stack trace:
Error: The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (`C:\Users\metin\Desktop\Programming\School\Typescript\From JS to TS\cypress\plugins\index.js`)
at Object.get (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\errors.js:1043:15)
at EventEmitter.handleError (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\plugins\index.js:189:20)
at EventEmitter.emit (node:events:394:28)
at ChildProcess.<anonymous> (C:\Users\metin\AppData\Local\Cypress\Cache\9.1.0\Cypress\resources\app\packages\server\lib\plugins\util.js:19:22)
at ChildProcess.emit (node:events:394:28)
at emit (node:internal/child_process:920:12)
at processTicksAndRejections (node:internal/process/task_queues:84:21)
I've been googling for a few hours and I'm looking for help on how to resolve this issue!
Uninstall Nodejs
Download the Nodejs (Recommended For Most Users) version from the link:
https://nodejs.org/en/
Install the downloaded Nodejs
I had the same issues
in my case, this issue was related to my bitbucket.yml.file, I changed: max-time:(set time for running your tests) in my job, and everything works fine
If you're using Cucumber then review your step files in search of misspelling keywords or case sensitive typos like wHEN or thEn

Cypress text execution error after version update

While I was having cypress 5.0.0 version, all my test used to run fine.
Now that I've updated it to 6.5.0, I am getting following error when I click on the test file.
**Title:** Error launching browser
**Message:** ERR_FAILED (-2) loading 'https://xxx/__/#/tests/integration\demoTest.spec.js'
**Stack trace:**
```
Error: ERR_FAILED (-2) loading 'https://xxx/__/#/tests/integration\demoTest.spec.js'
at rejectAndCleanup (electron/js2c/browser_init.js:205:1493)
at Object.stopLoadingListener (electron/js2c/browser_init.js:205:1868)
at Object.emit (events.js:315:20)
```
I've also tried installing cypress 6.8.0, but was have same issue, hence downgraded it, but still the error remains.

protractor test times out with D3.js and DC.js graph library

Recently my application has been upgraded to use JavaScript D3 graph library (D3.js and DC.js), and since then Protractor test started timing out with this error :
- Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
node_modules/jasmine-spec-reporter/built/configuration-parser.js:27
node_modules/jasmine-spec-reporter/built/configuration-parser.js:27
internal/timers.js:554:17
node_modules/jasmine-spec-reporter/built/configuration-parser.js:27
jasmine-spec-reporter: unable to open 'internal/timers.js'
node_modules/jasmine-spec-reporter/built/configuration-parser.js:27
Error: ENOENT: no such file or directory, open 'internal/timers.js'
node_modules/jasmine-spec-reporter/built/configuration-parser.js:27
node_modules/jasmine-spec-reporter/built/configuration-parser.js:27
internal/timers.js:497:7
node_modules/jasmine-spec-reporter/built/configuration-parser.js:27
jasmine-spec-reporter: unable to open 'internal/timers.js'
node_modules/jasmine-spec-reporter/built/configuration-parser.js:27
Error: ENOENT: no such file or directory, open 'internal/timers.js'
I tried many things like increasing the timeouts, adding sleeps or expected conditions to wait for elements etc. but every time my test just hangs on these charts and then timeouts.
If I run same test on older version of the Application test works perfectly fine. I also verified that there are no Identifier changes, but not sure what is causing test to hang.
Any help is much appreciated.

Does Electron support pausing on uncaught exception during debugging?

When I try to use this feature in both DevTools (chrome:///inspect) and VSCode, it doesn't pause at the location of the error in my own code, but rather the main.js file inside the default app that is bundled with electron that tries to load my modules:
Source: https://github.com/electron/electron/blob/master/default_app/main.js#L291
I've also tried this with the quick-start app and found the same issue... is there a way I can pause on uncaught exceptions in my own code?
Electron version: 1.8.2 (node 8.2.1)
OS: Windows 7
Command: electron --inspect-brk .
I realised/remembered that Electron has an initialisation phase which gets signaled via the app.ready() handler, so only uncaught exceptions raised after this completes successfully will pause execution in my main process code.
For now, I've modified Module._load in electron/dist/resources/default_app.asar/main.js to run outside of the try/catch block during --inspect so I can keep my ES module loading synchronous.

QunitJS-Tests don't start: PhantomJS timed out, possibly due to a missing QUnit start() call

I have set up my test environment as described here with QunitJS + PhantomJS + GruntJS: http://jordankasper.com/blog/2013/04/automated-javascript-tests-using-grunt-phantomjs-and-qunit/
If I execute the tests (grunt task) locally everything works fine. But If I try to execute the tests on our buildserver it throws following error:
I checked the URL and path several times and the html-document for starting the qunit tests is also available on the configured path on our build server. Any ideas why this error can occur?
The URL configuration for the qunit html file in the Grunt task was not correct!

Categories