KirstieJane/STEMMRoleModels

Testing Frameworks

jvoytek opened this issue · 7 comments

Unit testing (ensuring the smallest units of code in your app work as intended) and integration testing (ensuring different layers of your application work together as intended) are becoming standard practice in open source projects. They are another tool for ensuring code quality and reducing bugs when developers are distributed. What frameworks should we use?

I would prefer Cucumber - a tool for running automated tests. It merges specification and test documentation into one cohesive whole. Bugs and regressions are much less frequent in this and it will save a lot of time and money.
On the other side, Robot Framework. It's a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD).
It has easy-to-use tabular test data syntax and utilizes the keyword-driven testing approach. We can also extend it's testing capabilities by test libraries implemented either with Python or Java, and users can create new keywords from existing ones using the same syntax that is used for creating test cases.

Thanks for opening this issue @jvoytek! And for sharing your thoughts @amitkumarj441.

This is outside my area of expertise so any continued discussion would be great!

For unit testing, if we go the MEAN stack route (or even if use a JavaScript framework like Angular only for front-end), we can use Karma as the test runner and Jasmine or Mocha for testing framework.

Thank you @jvoytek, @amitkumarj441 and @grprtkal. This is way out of my knowledge base so all information and advice is really helpful :)

So we have (in alphabetical order):

Any other options?

How does this decision fit into any others we're making? Is it independent to our choice of development platform (#7)?

I think with regard to test runners and test frameworks there are more and less common combinations depending on the other technologies you're using like @grprtkal said. For angular and a MEAN stack, Karma+Jasmine or Karma+Mocha are the most common. There might be runners and frameworks with better features but I'd personally go with the most common combination so that there are more resources available for reference (examples, tutorials, blog posts, and stack overflow conversations, etc).

Karma + Mocha + Chai.

Whereby one does not necessarily need Karma.
Jasmine has the advantage to be available from a website (TestRunner.html), so I'd prefer this if this projects becomes a client-only one.

Cucumber is bound to Ruby on Rails, isn't it?
Never heard of Robot Framework before.

Hey folk - I really appreciate the discussions that we've had on this issue. I'm going to close it because we're aiming for a minimum viable product that I'd like to keep really simple.

There's absolutely no question though that testing is hugely important, I just think the discussions are a little too early in development right now.