3

I am revising a kotlin-js web browser application.

Currently tests are run through selenide and are limited as they interact entirely through the DOM and cannot call the code or inspect data.

More tests are needed, and I am thinking that an actual js framework is needed such as Qunit, mocha or jasmine etc.

The project is configured through gradle, but I have not found how to have tests run by a gradle project that simulate being run in the browser.

The overall question is, how to best deliver unit tests?

questions:

  1. Is there a better approach than the selenid approach?

Is there a kotlin-js based test alternative that can be run from a gradle task? What combination has been found to work, ideally without resorting to node.js in order to run a browser app. e.g instructions on using Qunit, jasmine, mocha or an other test running as a gradle task?

  1. Alternatively (not preferred) Is there some way to call javascript code (functions etc) and access page global variables from the selenide test code?

Any answers to either question appreciated.

innov8
  • 2,093
  • 2
  • 24
  • 31
  • 1
    There are changes since 06.19 in kotlin 1.3.40. See https://blog.jetbrains.com/kotlin/2019/06/kotlin-1-3-40-released/. They seem to add better support for js tests – thi gg Jul 31 '19 at 17:55

0 Answers0