axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dushshantha Chandradasa" <dushshantha.chandarad...@gmail.com>
Subject Re: Some ideas about newly added tests for Axis2/c utils
Date Tue, 05 Feb 2008 08:43:30 GMT
Hi Milinda and All,

Thank you very much for your valuable comment.  The main intension  behind
writing these unit  test cases is to improve the the test coverage of our
code base. Its really important to have unit tests not only to increase the
code coverage percentage, but also to keep the code bug free. Since we
didn't maintain a good set of unit tests from the  beginning , Manoj is
helping us writing few test cases beginning from the areas that we never had
unit tests before.

Writing unit test cases for existing code written by somebody else is bit
difficult. The good practice here is writing those while the developer
writing the code. So I suggest  all of  us  that  we'll polish the new test
cases up, to do a better job and make a habit of adding few unit tests for
the changes you are doing to code. These good practices help us to keep our
code in a high quality.

Thanks,
Dushshantha


On Feb 4, 2008 9:13 PM, Milinda Pathirage <milinda.pathirage@gmail.com>
wrote:

> Hi all,
>
> First of all I have to say that it's a good idea (tests for utils). I
> analyze some of the test cases and found out that they were not correctly
> implemented according to my knowledge. I think we have to figure out why we
> need those test cases and what we are going to test using that test cases.
> Looking at these implementations, I think no one can get any idea what they
> are stands for (but the name says what is going to test). So, I think we
> have to first identify what are we going to test and how we going to test
> them . Then we can clearly design some test case that correctly check our
> implementations for correctness. Followings things are some mistakes I found
> out in implementations under allocator test, and date time test. I didn't
> look into much about other tests but I think they also have same problems.
>
> When I first look at directory called allocator, I think it contains test
> cases for our env->allocator. But what is inside is test for fread and
> fwrite functions and function called test_base64() which contains some
> axutil_base64_binary_t creation function calls and getter and setter methods
> of it. Also some unwanted usage of global variables. Also axutil_env_t
> structure creations are wrong. One axutil_env_creation is inside the main
> method. It assigned created environment to global variable called env and
> inside function implementation another environment creation function is
> called and again assigned the return value to the same global variable.
>
> Inside date time test some mistakes that I have mentioned above also
> visible and the date time string use to test has wrong format.
> axis2_char_t * date_time_str = "2000-11-11 12:30:24";
> I don't know whether it was used intentionally. But it must have following
> format.
> "2002-11-11T12:30:24"
>
> So I think we have to look at these tests seriously and design these tests
> to test what we exactly want to test. Please feel free to comment on this.
>
> Thanks
>
> Milinda
>
>
>
> --
> http://inf-dimensions.blogspot.com "Infinite Dimensions"
> http://think2ed.blogspot.com "thinksquared"
> http://wsaxc.blogspot.com "Web Services With Axis2/C"

Mime
View raw message