Skip to content

Spectron TypeScript Starter for e2e testing electron applications

License

Notifications You must be signed in to change notification settings

pumano/spectron-typescript-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spectron-typescript-starter

Spectron TypeScript Starter for e2e testing electron applications.

Supports:

  • electron 3+
  • Typescript 2.9.x
  • Spectron 4.x (webdriverio under the hood)

Starter use:

  • async / await
  • page objects pattern

Project sctructure

src -- folder for your project's electron source code (contains electron typescript starter: https://github.com/electron/electron-quick-start-typescript)

test -- folder for tests

test/helpers -- helpers

test/po -- page objects

test/specs -- your specs (tests)

mocha.opts -- mocha config for test execution

mocha-allure.opts -- mocha config for test execution with allure reporter

Preconditions

install dependencies

$ npm install

build electron project

$ npm run build

Run tests

run e2e tests with mocha reporter

$ npm run test:e2e

Allure

preconditions

your need to install allure-commandline for using allure:

$ npm install -g allure-commandline

run tests with allure reporter

$ npm run test:e2e:allure

generate allure reports

$ npm run report:generate

generate allure reports and open in browser

$ npm run report:generate:open

clean allure reports (delete allure-report/allure-results)

$ npm run report:clean

Other

start electron project

$ npm start

run typescript in watch mode (recompile on file changes)

$ npm run watch

Decorators

@log method decorator can be used for logging purposes

License

This project contains electron typescript starter application (index.html / src/*) https://github.com/electron/electron-quick-start-typescript under CC0 1.0 (Public Domain)

Other code under MIT license.

About

Spectron TypeScript Starter for e2e testing electron applications

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published