Raphael begins by explaining that culture is a set of values that we agree upon.
In a company, you might get trained, but in OS this does not work. You might not even know who you are working with, they work as volunteers (so you cant force them)
So an interesting question is: How do developers collaborate on GitHub regarding testing? Is it different from professional teams?
This is why Raphael and his colleagues performed a grounded theory study to find this.
When do contributors add tests?
Raphael found that when a developer receives a pull request, the developers look at it, executes the tests (if there are any) and merges it.
But this changes if the developer knows the contributor very well, he is more likely to skip the tests. If not, he asked for tests. Chances were also higher that the owner asked for tests if the pull request was big, or complex.
Another reason that a owner does not ask for tests if the owner feels that would be a lot of work (f.i. if the contributor has to set up multiple different machines)
Reasons for contributors to add tests were:
- to add confidence
- to highlight the value of the request
- because they felt obliged (if there were already tests in the project)
How to improve testing?
This final observation is interesting: so if you as an owner want to have more tests: lead by example! Other ways to increase testing are to use test frameworks and to write guidelines or manuals. Raphael and his team found that if there are guidelines present, if increases confidence in contributors.
Some project owners made testing very visible (for instance, of you use continuous integration, you get a special badge on GitHub) and this too helps to both attract contributors to their project and to increase testing.