So.. I need to train the team on Unit Testing - could use C&C on lesson plan

前端 未结 10 1084
你的背包
你的背包 2021-02-01 09:36

So - management is looking to do a push to move towards doing unit-testing in all the applications moving forward - and eventually get into full TDD/Continuous Integration/Autom

10条回答
  •  盖世英雄少女心
    2021-02-01 10:15

    Just because I have been doing something where TDD (and unit tests in general) has been invaluable and because it might make a good demo, I'd suggest an example using Regex, especially if you aren't a Regex expert, it's quite easy to make mistakes.

    It'd also make for a good 'show, not tell' demo. If you just:

    step 1: Tell them just to write some code with a Regex to match a certain pattern.

    step 2: expand the pattern to something else.

    step 3: show how unit tests immediately let them be sure that a) it matches the new pattern and b) it hasn't broken any of the previous matches or let through results that shouldn't be.

    In general C&C of your review, it's hard to get an idea of exactly what sequence events will go in. Also, semi-month seems far too infrequently if there's just a void inbetween with no push to apply their knowledge. The last thing you want is it to become some meeting they go to and forget about as soon as they are out of the room!

    Do you have sufficient downtime in your current workload to address technical debt and get the team to actually pair up and start looking at adding unit tests to some existing functionality and refactoring where necessary to allow mocking?

    I would say that will prove far more effective than lectures and potted workshops, YMMV.

提交回复
热议问题