SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Aug 2001
    Posts
    420
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    performance testing in the unit testing

    Has any one done some performance testing in the unit testing? Like the duration each method takes to perform what it suppose to do?
    If yes how you come up the test plan to test it? What documentation or resource did you use to confirm your testing? Thank you in advance.


    ------------------

  2. #2
    Senior Member
    Join Date
    Dec 1999
    Location
    Chicago,Illinois,USA
    Posts
    2,537
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: performance testing in the unit testing

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by qa_tester:
    Has any one done some performance testing in the unit testing? Like the duration each method takes to perform what it suppose to do?
    If yes how you come up the test plan to test it? What documentation or resource did you use to confirm your testing? Thank you in advance.
    <HR></BLOCKQUOTE>

    Keeping in mind that unit testing can be various things based on how you define a "unit", I would say that, yes, I have done performance testing during the unit test phase. Usually modules or very complex functions/routines were tested with specific timer code. (That code has to be outside the loop of the routine, of course, so as not to influence the measure.)

    As far as a test plan, it was written up as per the functionality. For example, in the unit test plan I wrote for one company we had a Java applet that would allow a user to search for a car in a given range of miles. There were two complex algorithms for computing the range (one a square, one a circle) that determined what values got left off. It was important that those methods, by themselves, worked very quickly because, as you can imagine, the farther the miles, the longer the search.

    So timer code was placed around each algorithm and then various search types were run. For example, we did one for very popular SUV vehicles, and another for less popular cars. And for each we did a test of different mile ranges (10, 30, 50, etc.) This then showed us how the algorithm, by itself (not in tandem with the Java applet front-end yet) worked in terms of speed. Based on our initial findings we had to tweak the algorithim a little bit.

    How we confirmed it, to answer the second part of your question, is that we had established a set of SLAs that dictated how fast the algorithm should work. We knew we also had to eventually take account of the Java applet itself in the browser so we then lowered our SLA (meaning, made it more strict). Once we measured it to be consistently at the levels we need (within acceptable margins of error) we felt confidence in the performance of the algorithm as a single entity.

    Of course, we also did performance testing of the integrated algorithm with the other Java code and the full Java code integrated with the browser.

    ------------------

  3. #3
    Senior Member
    Join Date
    Aug 2001
    Posts
    420
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: performance testing in the unit testing

    JeffNyman can i have your email address?
    or you can email me at wiseman_alan@hotmail.com.


    Thank you

    ------------------

  4. #4
    Senior Member
    Join Date
    Dec 2000
    Location
    Pune, Maharashtra, India
    Posts
    1,037
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: performance testing in the unit testing

    Firstly its great to see that you are trying to build in performance into your application instead of simply trying to "test in performance" at the end.

    You might want to sit down with your customer first and figure out things like the response times he expects for various transactions with the system. This you can put down as the non-functional requirements (NFR).

    Based on that you could look at what widgets comprise a "unit" for you. It could be a couple of ASP/JSP pages, a couple of EJBs or COM components and eventually things like DB stored procs. What you need to then do is decide what should be acceptable times for each of these to finally arrive at the time specified by the NFR.

    As an example you could stipulate that a stored proc must return before x seconds given y records. That might eventually prove to be a strategy that might help reduce the final transaction times.

    The important thing is that you start early. And hte unit testing phase is often the best time.
    Suresh Nageswaran, CQA, CSTE
    Lead Consultant
    Kanbay Inc.
    Pune, India.
    sureshnageswaran@yahoo.com

  5. #5
    Senior Member
    Join Date
    Aug 2001
    Posts
    420
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: performance testing in the unit testing

    The way we perform our unit testing is on method basis, some I donít see a lot of performance testing can be done, but maybe we can do that on class basis. Do you agree?

    ------------------

  6. #6
    Senior Member
    Join Date
    Dec 1999
    Location
    Chicago,Illinois,USA
    Posts
    2,537
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: performance testing in the unit testing

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by qa_tester:
    The way we perform our unit testing is on method basis, some I donít see a lot of performance testing can be done, but maybe we can do that on class basis. Do you agree?
    <HR></BLOCKQUOTE>

    Without knowing your exact setup, it would be hard for me to issue any categorical statements of agreement or disagreement. However, I would agree that if the methods you have are not really amenable to strict performance testing at that level you can certainly do it at the class level, by instantiating the class and then calling forth various methods of the class. Then you can do timings on those groups of methods rather than on a single one, per se. Again, it all depends on how you have things set up.

    In general, you can do performance timing around anything (which is why I mentioned that "unit" can mean different things) as long as you feel you can get reliable and accurate numbers from the execution of the code.

    ------------------

  7. #7
    Senior Member
    Join Date
    Jun 2001
    Location
    London, United Kingdom
    Posts
    131
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: performance testing in the unit testing

    I used a tool once gprof (unix c/c++) that profiles the code. By that I mean it records the flow from method to method and records the number of calls and the time spent in each method and in all methods called by a method.

    This can make it easy to pin point where the time is being spent. Very useful for performance testing at the unit level.

    russ

    ------------------

  8. #8
    Senior Member
    Join Date
    Aug 2001
    Posts
    420
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: performance testing in the unit testing

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by trewshrew:
    I used a tool once gprof (unix c/c++) that profiles the code. By that I mean it records the flow from method to method and records the number of calls and the time spent in each method and in all methods called by a method.

    This can make it easy to pin point where the time is being spent. Very useful for performance testing at the unit level.

    russ

    <HR></BLOCKQUOTE>

    Thank you all for your responds.

    Russ, that exactly what Iím trying to do right now. But the different is Iím using VB.Net, and I measure the duration time of each method.

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:50 PM.

Copyright BetaSoft Inc.