arklet icon indicating copy to clipboard operation
arklet copied to clipboard

Automated testing framework

Open PieterjanMontens opened this issue 2 years ago • 6 comments

Hello,

It would be great to add a testing framework to the project. Beyond Django unittests I suggest a behaviour-driven (BDD) component : Behave. There's an available Django integration, and has as main advantage that tests can be easily written, understood, and enhances code-reuse (which is a way to avoid test code rot).

What a simple test might look like :

Feature : Minting ark identifiers
  Scenario: Simple minting request
    Given we have a running arklet service
      When we mint an id for url "http://example.com/this_test_is_ok"
        Then we obtain an ARK id
        And it forwards to "http://example.com/this_test_is_ok"

(see behave documentation for more information)

If the suggestion is validated, I can work on a PR that implements testing (be it behave or unittests).

PieterjanMontens avatar Apr 23 '22 21:04 PieterjanMontens