Build. Hack. Play. It's just what we do.
Build. Hack. Play. It's just what we do.

Library Roundup: Testing

Illustration for article titled Library Roundup: Testing

In the spirit of adaptation, I'm gonna focus on testing libraries for this weeks pan-language weekly library round-up. The Pyramid webframe work project has a great description on the three main types of tests: unit, integration, and functional



Tests only one function/class method/"unit" of code. The idea is to test whether a given set of inputs produces a given set of outputs, on the smallest possible level. This is testing things like whether an equation is wrong, if a text is being parsed correctly, does a search work, basically any non-reducible non-trivial task.



Tests how the units play together/talk to each other. So this might test that the output of the parse function can be fed into the search function, and another test might look at whether that search result can then be fed into the equation. This is about testing how the pieces of the system play together.



This is also called an end-to-end test, and here is where user testing fits in. This test would check that input fed into the parse function would lead to some result from the equation. UI testing can also fit in here.



Please form your responses with: [Language] Library Name that links to
the library's homepage or archive (PiPy/CRAN/CTAN/etc.) listing - what
the library does and why you're recommending it.
2. Testing library only please. Do you wanna share something else? In the comments, Suggest that theme for next week.
3. You can choose whatever language you like: Python, Javascript, Java, Prolog, Haskell, SQL, x86 assembly, Piet, any of the zillions not listed here, etc.



[Reference] XUnit
- Granddaddy of unittesting frameworks, basis for jUnit and python standard lib testing module, among others. You've either already used a library based on xUnit or you should.



Share This Story

Get our newsletter