keepass-diff icon indicating copy to clipboard operation
keepass-diff copied to clipboard

Automated tests (unit and e2e)

Open Narigo opened this issue 6 years ago • 3 comments

Right now, testing relies on me doing manual tests. It would be a lot better to have automated tests verified by Travis / GitHub Actions or similar.

There should be two kinds of tests:

  • [x] E2E tests, running the CLI and testing various options against a snapshot of results
  • [ ] Unit tests, testing the diffing algorithm and the results

Narigo avatar Nov 03 '19 21:11 Narigo

I've added a few e2e test in run-tests.sh to make it a bit faster for me to check some properties. It doesn't do snapshot tests but I think this is good enough for now.

Unit tests were added for the StringStack that I've added to keep track of the used paths. The diffing algorithm is still untested - @sseemayer do you still want to have a look into it?

Narigo avatar Nov 12 '19 23:11 Narigo

The e2e test should include flags for user input as well. Piping a file as stdin should work but it looks like the output is not starting on a new line then.

Narigo avatar Feb 08 '21 02:02 Narigo

#41 is now checking the automated tests from run-tests.sh. Not closing this just yet as there should still unit tests to be added and checked.

Narigo avatar Jan 22 '22 02:01 Narigo