Dave Merrill
05/11/2024, 11:29 AMdomwatson
05/11/2024, 11:38 AMseancorfield
git
repository and it can run pipelines on commits to branches (including the main branch). That's how we run all our automated tests. We used Jenkins before that.
Plus, with TestBox, developers can run tests any time they want via CommandBox or via a URL in a browser.Adam Cameron
it("does x when y happens", ()=>{})
Write down in the description what part of the work you're doing. Like "it adds tax when the order is over $$$"
or something. Even doing this keeps you focused on what yer doing.
Ideally write the test that will verify that the tax has been added (or whatevs), then write the code.
But even if you write the test afterwards, writing the description first and the the code and then the test is still better than not even thinking about the tests until afterwards.
I can tell when my devs aren't doing TDD cos their tests will be "it returns true when the inputs is [blah]" or something like that. That's testing implementation detail. No-one gives a shit about that. One only gives a shit that the feature that the client needs has been fulfilled (they do not care about booleans being returned from functions ;-)). And then the various variants of the feature have been fulfilled. Rinse and repeat. Small steps.
Run yer tests often.
Update yer main branch on local... run the tests to make sure no other oik has broken them
Work on yer branch (or whatever)... do small steps and run yer tests whenever you pause to think "OK what's next?" (cos "what's next?" might be "ah bugger... I broke a test" 😉
You'll adopt a cadence and it will become muscle memory.Dave Merrill
05/13/2024, 12:18 PMAdam Cameron
Dave Merrill
05/13/2024, 2:36 PMseancorfield