mercredi 17 avril 2019

Why is TestCafe crashing on launch testing Electron app with simple command-line?

I am attempting to run a test on our Electron app using TestCafe. I am getting an error mentioning a "-m" command, however that is not used in my script or command line.

I have everything set up as described here: https://github.com/DevExpress/testcafe-browser-provider-electron#testing-an-executable-electron-application

C:\packages>testcafe -d "electron:C:\Program Files\OurApp\" "C:\Temp\test.js" -hostname localhost

Using locally installed version of TestCafe. ERROR Tested app failed with an error:

Error: Command failed: -m '-m' is not recognized as an internal or external command, operable program or batch file.

at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:557:12)

Type "testcafe -h" for help.

The script for test.js is below:

import { Selector } from 'testcafe';

fixture `Electron test`
.page('./index.html');

test('smoke 1', async t => {
await t
.debug() 
.click(Selector().withText('Create a new configuration'));
});

What could be the cause?

Aucun commentaire:

Enregistrer un commentaire