Sunday, 22 November 2009

Testing at University

I did Computer Science while I was at University. Thinking back to my time there I think the only testing covered was about five minutes and introduced the idea of white box and black box testing. Being a tester I think that there should be more testing in University. Sure the majority of people doing Computer Science are going to get into the development but even so developers need to test as well.

The first I ever heard about JUnit and Unit Testing was when I was in the industry. So basically all the developers coming out of University have to learn about Unit Testing when they start working and then they learn all about it, so there Unit Tests mightn't be the best coverage or there may be some resistance to doing it as they haven never seen as part of "coding" before. Though when they start seeing continuous integration catching bugs and they personally start seeing their unit test catching things and that last time they did something similar was caught by the test team and went through the defect tracking system etc which everyone can see.

There will be the argument that Computer Science is there to teach Computer Science not Professional Software Development. What I say to that is how many people doing Computer Science go on to become Computer Scientists and how many go on to do work in Software Development?

Also could it help the students and lecturers? Maybe in first year when assignments are very directed do this, do that, do a while loop, do a for loop etc. giving the students the JUnit tests and have them write their code to match that. This will also make marking very easy as it will be run the Unit Tests and see if they pass or not.

Also later on when students are implementing algorithms to aid the understanding of what they are doing in lectures could get them to write unit tests to help show that they understand the code they are writing and where they were trying to get to with the code they are writing.