where people do not have traditional roles and everyone has a broad skill set, it is likely that many organizations have some sense of boundaries.
- The Software Developer
- is responsible for writing unit tests for any code she touches and for running any tests available so as to verify the stability of the codeline.
- might also work with the QA Engineer to write functional tests.
- might help maintain build scripts for modules they understand architecturally
- The QA Engineer
- can help with defining functional and integration testing
- can look at incorporating test coverage reporting into the automated suite - to ensure that code is appropriately exercised by those tests, and to maintain the desired levels of test coverage for new functionality
- The Release Engineer
- can enable the development team to do local builds
- help define criteria for acceptance at various levels
Process and Workflow Testing
Many companies use workflow and tools to help automate their process, e.g. having defects being reported and going through a certain lifecycle with different sign-off points and different levels of authority. Agile teams tend to keep these processes as simple as possible - allowing people to make decisions flexibly based on their own judgement. But what happens if you are in a situation where this is not deemed sufficient? Don't forget that changing a process requires testing to ensure that the process now does something slightly different. It is very common to find organisations making process changes on the "live" system in a rather uncontrolled manner.
So, treat your workflow process as something that needs:
- change control and configuration management - can you reliably report on what was changed and when? Can you roll back changes if they didn't work?
- testing - as for code - can you automate this and make sure the workflow still works and a minor change hasn't broken something else?
- release - do you have a test environment so that changes can be made offline, tested and then applied to the live environment
These things need to be taken into account when choosing the tool you will be using for your process - what reporting requirements are necessary, are there any licensing implications for test environments?
How to get there
While not part of the traditional definition of SCM, testing is an enabler for an agile SCM environment. Rather than controlling risk by slowing change, you control risk by monitoring the state of your codeline after each change.
Testing and test driven development are not things that happen naturally alas, and the reasons for this could be the subject of another article. Here are some steps that you can take:
- Make sure that running tests is part of your build (even if tests don't exist yet).
- Make passing tests part of the criteria for a good build
- Include code coverage metrics in your build reporting. Consider failing builds if test coverage goes down (which implies that code was added without tests)
- Start writing tests. (where to start, strategy)
Writing tests where there are none is challenging, but necessary.