Questions tagged [spectron]

Spectron is a testing framework, built upon ChromeDriver and WebdriverIO, for end to end testing Electron applications.

Spectron is built by the Electron team to make end to end testing Electron apps easy. As of 2017 it's the only e2e testing framework with native support for Electron.

It's a wrapper around WebdriverIO which their API's is almost the same, except the additional Electron parts.

112 questions
0
votes
1 answer

E2E Test Electron With Spectron - Docker Windows

I'm working in E2E testing in an application running inside Electron, to make it able to run in a pipeline in Jenkins I put it in a docker container that is running a windows service (build version 1903) image. The problem is that the chrome driver…
Rafael Lima
  • 509
  • 5
  • 13
0
votes
1 answer

Spectron with mocha and chai does not work

I am trying to write a tests with Spectron for our Electron App, but I am running into problems with the setup. I use the classical setup with chai. I have one file which contains setup code: const path = require("path"); const { Application } =…
Gh05d
  • 7,923
  • 7
  • 33
  • 64
0
votes
2 answers

Spectron app.client.close() does not trigger on('close' event

I have a multiwindow electron application, namely it consists of a launcher window and a main window. The main process is responsible for first showing the launcher, and after everything is initialized it gets an event over ipc and shows the main…
Tom
  • 3,807
  • 4
  • 33
  • 58
0
votes
1 answer

Use travis for build and testing with electron

I have an electron project with spectron tests. I use travis to build for every major OS with electron-builder. Now, I want to also run tests in travis, so I updated my .travis.yml file to run tests on linux (for headless tests) and build on osx.…
Yerko Palma
  • 12,041
  • 5
  • 33
  • 57
0
votes
1 answer

Reacting to ipcMain events in Spectron

I have an electron application that first starts a launcher window (in a renderer process) that starts several background services. After those background services started successfully it sends "services-running" on its ipcRenderer back to the main…
Tom
  • 3,807
  • 4
  • 33
  • 58
0
votes
1 answer

Import Test result to jira for cucumber tests

I have Spectron project which outputs to junit reporter as result.xml file. I want to import the test results as test execution to the corresponding Test in Jira Ticket. Some of the Jira Tests are manual and others are cucumber tests. the content of…
FarFarAway
  • 1,017
  • 3
  • 14
  • 35
0
votes
1 answer

creating mocha test suite to start app just once

I have following files test1.ts test2.ts test3.ts test4.ts test5.ts I want to start the tests at once with a unified before and after so that i start the application just once and run tests and close it after that every test file has its own…
FarFarAway
  • 1,017
  • 3
  • 14
  • 35
0
votes
1 answer

Testing Time input field with prefix

I have a Form with Time input field
FarFarAway
  • 1,017
  • 3
  • 14
  • 35
0
votes
1 answer

running electron app with custom main.js file. Electron rather starts the default main.js file

I have electron app with main.js which contains const electron = require('electron') const { app, BrowserWindow } = require('electron') function createWindow(){ let win = new BrowserWindow({width: 800, height: 600}) console.log("loading…
FarFarAway
  • 1,017
  • 3
  • 14
  • 35
0
votes
1 answer

How to test an Electron browser using Spectron

I'm trying to test my company's Electron built browser https://github.com/maidsafe/safe_browser but am meeting a few challenges which I am looking for support / guidance with. After a fair amount of research, it seems I essentially have two options…
Calum
  • 1
  • 1
0
votes
1 answer

How to get spectron tests results and pass them to outer test(for example, Ucumber-Junit test)

I have an app, that consists of two parts 1. Backend, Java Spring Boot app 2. Electron/Angular front-end I wanna test backend and frontend together. It would be great to start JUnit cucumber test, call the spectron test from one of cucumber cases,…
Daniel Prosianikov
  • 100
  • 1
  • 1
  • 10
0
votes
1 answer

How to launch electron app using child_process in spectron testing

Is it possible to launch electron app using command line with help of require('child_process') in spectron, Normally we launch the app using command prompt like below, cd C:\Program Files\Project C:\Program Files\Project>Launcher.exe test.json So…
uKEsH
  • 3
  • 1
0
votes
1 answer

How can I wait to electron while loading html

I have an electron app which loads an HTML file on opening. When I tried to wait for an element with waitUntil method from the opening page, Spectron tries to find that while page loading and it crashes my app and app staying at the blank page. How…
sayhan
  • 1,168
  • 1
  • 16
  • 22
0
votes
1 answer

How do i install spectron and start scripting on it?

Got a recent Requirement, where i need to do Test Automation of Backend Node js application using the spectron. I would like to know what are programming skills required to approach the same
Saran3g
  • 29
  • 5
0
votes
1 answer

How can i run Spectron test in docker?

I run Spectron test in windows PC. I want to test my application in docker. I am not sure where I can get docker image for Spectron.
Bharath Kumar S
  • 1,410
  • 2
  • 10
  • 29