Introduce InternJS framework for UI functional tests

Fuel front-end should be covered with functional tests to avoid regression.

Problem description

Functional tests for the front-end layer of Fuel are currently created with CasperJS framework, while tests are run against headless browser phantomjs as a part of CI procedure.

Developer that works on bug fix or creates a new feature supposed to cover them with both unit and functional tests to avoid regression. The way functional tests are created and maintained currently is complex since CasperJS is not that flexible with the single-page web applications as InternJS. In addition there is no way to run tests against browsers with UI for debugging purposes.

Proposed change

Adopt InternJS as the primary testing framework for UI functional tests.

Test runner should be updated correspondingly to utilize Intern instead of Casper. Expected syntax:

  • ../ --ui-func - to run all tests
  • ../ -t static/tests/functional/test_welcome_page.js - to run single test suite



Data model impact


REST API impact


Upgrade impact


Security impact


Notifications impact


Other end user impact


Performance Impact

As soon Intern-based tests are run against Firefox browser it will take additional time for CI to validate patchsets committed.

Plugin impact


Other deployer impact


Developer impact

Front-end developers have to cover features and fixes they work on with functional tests. These efforts should be taken into account while planning.

Infrastructure impact

CI workers should be able to run Firefox browser in order to execute functional tests against it.



Primary assignee:

Other contributors:

Work Items

  • Research the way how Intern tests should be created and organized
  • Update test runner to utilize InternJS for ui tests
  • Make sure xvfb integration is set up, so it is possible to run functional tests headlessly (like with CasperJS and phantomjs)
  • Configure InternJS runner so it provides informative trace info of tests execution
  • Create initial helper library to cover the most frequent tasks (log in, skip welcome page, create cluster, remove cluster)
  • Create several tests as an example





Acceptance criteria

  • Functional tests for the UI are the part of the CI process and are executed on every commit. Execution result affects build status
  • InternJS runner is configured to utilize more informative reporter
  • It is possible to start tests execution using xvfb to avoid browser window popping up
  • Helper library (page) that covers below use-cases is created:
    • Log In
    • Log Out
    • Skip Welcome page
    • Create Cluster
    • Remove Cluster
    • Add Cluster nodes
  • The following pages (partially) covered with functional tests:
    • Log In
    • Welcome page
    • Clusters page
    • Cluster page

Documentation Impact

Documentation should be modified to remove mentions of CasperJS and its installation prerequisites. Usage and installation of InternJS should be described instead.