finos / FDC3-conformance-framework

A framework for testing whether desktop containers implement the FDC3 standard
Apache License 2.0
14 stars 15 forks source link

Indicate that tests are finished (to make use in a CI system easier) #240

Open kriswest opened 1 year ago

kriswest commented 1 year ago

This was in another issue but hasn't been dealt with:

1) Add a clear indication that tests are complete. Adding a 'done' message in the main view after all tests have run would:

  • Ensure that its easy to determine when tests are complete
  • if errors occur in before or after hooks not all tests will run, leading to the progress % stopping at less than 100%
  • Allow the test framework to be more easily installed in a CI system and the results extracted at the end of the run

progress indicator

Basically, because:

we've ended up just putting in a fixed length wait for the tests to run. That's brittle and wasting time (as it needs to wait just longer than the longest possible run).

Please can we have either the number of tests or a message posted in the window on completion.

kriswest commented 1 year ago

@robmoffat @gaganahluwalia To implement this, you can pass a callback to mocha.run(cb) in the test framework here. It'll be called when done, with a status code indicating whether any tests failed. See https://mochajs.org/api/mocha#run for details.

Presumably you'd just add the message elements to the HTML with CSS hiding them then show one in the above callback (depending on result) + hide again on a new run.