Sep. 4th, 2011

poltr1: (Mad Scientist)
In the past couple of weeks, I've been tasked with writing unit tests for the code I developed. My project lead is big on unit testing, and wants the code to be tested thoroughly with many varied test cases.

What is unit testing? Wikipedia defines it thusly: "unit testing is a method by which individual units of source code are tested to determine if they are fit for use." What it means for my client is to identify test cases, determine what the anticipated results are, run the code, and check the results to see if they match the anticipated results.

This was something I never learned in college, This would have been covered in a software engineering class. There was one on the books, but we didn't have an instructor to teach that course. (Yeah, I can go on ab out the politics of my CS department, but I'll save that for another time.)

So I'm struggling with this. I can look at the data, and I can't tell if it looks right or not. I've asked for help, but the attitude I seem to get from both my project lead and tech lead is "We expect you to know these things." And so I write the tests, not know if if what I'm looking for is the right answer or not.

Profile

poltr1: (Default)
poltr1

May 2025

S M T W T F S
    123
45678910
11121314151617
1819 2021222324
25262728293031

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 1st, 2025 10:08 am
Powered by Dreamwidth Studios