Research Session – JS UT Experimentation

Recommend starting with Chai.js + Mocha, and Sinon.js for mocking when necessary. 

A lot of the test libraries available are similar, so it is hard to go wrong. Chai.js appears to be commonly used and also integrated into larger frameworks. Since Chai is just a test authoring library, there is still need for a tool to execute the tests. For current needs, Mocha has good support and a lot of reporting output options. At this point, the added benefits provided by do not add immediate value for me, but transitioning to it from Mocha should not be difficult.

Further analysis plans

  • Look into Test Runner outputs and how they might integrate into JUnit reports

Simplistic examples created during experimentation can be found on Github here.

Session notes below the fold…

Continue reading Research Session – JS UT Experimentation


Research Session – Javascript Unit Testing

Report Summary:

  • Much like the rest of the Javascript ecosystem, there are a lot of options for any given problem and not a lot of community consensus
  • There are two aspects of JS testing needing to be addressed: tools to test (libraries) and tools to report results (test runners)
  • When selecting libraries, there are two style choices: TDD (Test Driven Development) vs. BDD (Behaviour Driven Development)
    Historically, our company has been more comfortable with TDD
  • Chai.js is a TDD library that looks like a good place to begin learning and experimenting with test authoring
  • Still not sure of pros/cons between test runners
  • Further analysis plans

Session notes below the fold…

Continue reading Research Session – Javascript Unit Testing

Test Sessions – Research Sessions

My responsibilities include researching and investigating tools to help others test software. I was recently asked to investigate options for helping developers author Unit Tests for Javascript applications.

While thinking about performing the investigation, it came to me that I was testing something: a domain of knowledge. And what is a good tool to record such testing? Test Sessions!

So, I am experimenting with this idea. I gave thought to my mission, wrote up an initial charter of exploration ideas, and have begun recording my path through the internet and contacts to learn more on Javascript unit testing.  Once I wrap it up, I will likely have more charters to explore and can try my hand at my first test report to hand back to the person requesting this information 🙂