4 ms·
> figure out how to automate into a script that developers can use to run automated tests That was my thought exactly. A test suite that starts with a setup, r
by ZanrielJames 9y ago
> figure out how to automate into a script that developers can use to run automated tests
That was my thought exactly. A test suite that starts with a setup, runs a few e2e "smoke" tests to make sure basic functionality is there, then a teardown.
Since the real action is handled by Ansible, I think it should be relatively easy to set up a dummy repo that only simulates playbook runs without actually doing anything. That way you can hit "build" or "patch", get a valid response back, output even, but it's not actually going out and hitting anything.
My main thing is, now that we've nearly tripled the number of devs working on it, and it's now being used by another team (was 2 teams using it, now 3), we'd be irresponsible to add any new features or do further development without a way for contributors to, at the very least, type "python runtests.py" or just type "pytest", and see that the site still has basic functionality.
Here's an example: There's a system in there that allows admins to assign roles to users. Some JS was added for a totally unrelated feature, but it ended up intercepting form submits on that page. I didn't find out there was a problem until a couple days later.
Another time, I was giving a demo to 4 different managers, and I went into this one section to do something, got a 500 error. Turns out I had a couple lines at the end of a view function at the wrong indent level.
It's embarrassing. Before trying to set up Jenkins, Docker, whatever else, a few basic high level tests that cover 5-10 areas of the UI would surely keep us from embarrassing ourselves at the very least.
Thanks for your input.