Archive for the testing Category

LR VUGen scripts (workhorse! Read and you will get it!)

Posted in programming, testing on April 22, 2009 by bey0ndy0nder

VUGen as an editor is a joke. Blah blah, it is just crappy (my opinion of course). I got Eclipse to work for me building VUGen scripts and running by calling some .bat files; I don’t remember the details, it has been awhile since I messed with it because I was having slowness problems due to file permission issues I was having at the time.

So right now I’m doing some refactoring of scripts. These scripts are in C, with API functions to work with http request/response and helper functions for dealing with parameters. I believe that it runs in an c-based “managed environment” so it is not 100% ANSI C (whatever the hell that means!) I’m not going to go into details on what the restrictions are…

Anyway, I want to talk about structuring C code. I’m by no means an C expert, because I mostly programmed in C++, and as you know, I suck at C++! But I always believed that you do not have to have all the object-oriented bullshyte in order to have modular, relatively robust, safe and sound code…with ample supply of KISS and DRY. Yeah–that’s the theory. It take tons of practice and patience to be able to apply all that 100%; it also takes a little bit of common sense too. Also, I like to mention I’m putting several different code path inside a single script, because I want to implement a distribution based system, which follows real production usage patterns. As of now, I only have hit-based, url-bound (no parameter information) usage patterns from logs. What I need is the graph of usage–that is something I will have to do in the future.

The truth is though: no one gave a damn about load testing scripts. I don’t even give damn about it. It’s semi-useful right now and in the future it can become somewhat useful. But in the END it all comes down to the actual App. No one gives a damn about it, unless you are working on the App!!! That makes sense. That’s keeping it real. I just want to do a semi-decent job at re-factoring, so we don’t have to mess with it much in the future–I want to learn other things. (I don’t want to sound like I’m enthusiastic about my job, because I’m not. But they pay me so I try to do the best I can. I’m a work whore, I know).

What I have been doing pretty good (I think):

-Having manager structures. It’s not fully blown C structures (i.e. with functions) so they only contain data. For example, I found they are nice for managing transaction and/or parameter names. So I keep them in a single place. It’s like a resource file! This allows me to easily implement chronological based transaction naming (yes, I looked into automating with macros).

-Having nice “leaf” functions that does one thing and are based on parameters for control.

So I can do something like:

//login

//LoadDataController
//Make http request for data and handle other things

//UsagePatternController: run N iterations
enum CodePath
{
codepath1,
codepath2,
codepath3
}randomChoice;

randomChoice = (enum CodePath)getChoiceBasedOnUsage();

switch(randomChoice)
{
case choice1:
prepare to parse something.
getReadyToParseSomething();
doReallySweetLeafFunction("Parameters for control");
validateParsedData();
case choice2:
doSomeOtherThings()
doReallySweetLeafFunction("Parameters for control");
..
...
...
default:
}

//Logout

So you read it this far huh? WOW. I’m sorry I usually don’t proof read my blogs. And you know I can drag on and on and on about just bullshyte. WTF. I’m going jogging.

ehm random intertube readers (the haters. If you love me then we’re still cool)

Posted in programming, testing, thoughts on April 20, 2009 by bey0ndy0nder

Seriously, some of you may think I walk around work all zombied out @ work or something…confused?

Not really. I’ve been having a few “bumps,” but it is not serious–as in catastrophic where shit is CRUMBLING. So who is perfect and never make mistakes at work?

It’s not like the only thing I do is just load testing a single project. I’ve been working on that, and on other projects too, plus writing different little programs (for example, I have a little programs that will parse clickstream data to figure out the pattern usage distribution. We have a program that supposedly does that, figuring out the flow, by parsing http access logs. However, running that last friday produced in consistence results; that is, it did not work on my application. I also have scripts which parses usage pattern in terms of percentages. Not as useful as getting the flow. But like I said, the current program does not produced correct flow for me). Also Not to mention occasionally digging through the logs to find problems.

And I work hard too. I just worked like 6 hours over the weekend coding up a new load test module (in c) and load testing, figuring out how to get data from the DB, and then testing it. All this is getting the requirement to do this late Thursday afternoon and not really start work on it proper until Friday afternoon due to HAVING TO WORK on other stuff too.

So please, if you think I’m confused all the time, find someone else. In the meantime you will have to get your QC to take over. Or maybe you already have someone to take my place…new QE’s? I’m not saying I’m special and deserve some star. I’m just saying…but this is more directed at random phantom readers off the Internet whom think I go to work zombied out. Man fuck you! I would never do that. Your son can blow me and go blow smoke up someone else’ ass.

Do I sound a bit cranky? I only got a few hours of sleep. Cos I wanted to hang out a little bit after working over the weekend, and couldn’t sleep until like 1 or 2.

*rolls eyes*

Seriously. FUCK YOU YOU FUCKS YOU RANDOM INTERNET READERS (except you of course baby.)

confusion

Posted in programming, testing, thoughts on April 16, 2009 by bey0ndy0nder

So I was talking about under-utilization…hmm, this is something that everyone knows is probably due to the app being resource bound (DB).

So I’m doing load testing and my manager was like increase VUsers until you hit 80% utilization. I took it literally when instead he meant for me to test the application to determine whether or not we are DB bound,whether or not the app server can handle it. So I thought this was a known issue and completely mistook the directions as something else. So I send out emails talking about underutilization and burst utilization and everyone was like WTF are you talking about???Like I was smoking crack.

It just part of working…

ADDENUM:

It’s not really “probably” it really is! Or a significant part of it.

Under-utilization or … ?

Posted in programming, testing, thoughts on April 16, 2009 by bey0ndy0nder

I can’t really sleep, so I’m going to blog a bit:

I’m doing load testing: tweaking with the number of virtual users and monitoring CPU utilization, and what I’m seeing is perhaps under-utilization. Is it really? Maybe it is the load scripts. The scripts I have right now is just not realistic enough where the behavior is: login, then run a sequence of tests, and then logout. In reality, the usage pattern is login, then continuously working for an extended period (this is the observed behavior in clickstream), then logout. Therefore I’m need to eliminate the possibility that not enough load is generated by the scripts, by making it more realistic–in terms of looping the sequences of tests. If this doesn’t work, and the CPU is still underutilized, then I will have to try other things, such as: thread tracing, netstats, etc,etc.

So why is the script doing this? Well, I’m still maintaining it; I really need to sit down and make it more realistic.

I’m under a lot of pressure right now for results (I hit a few mishaps lately). Even though I feel that I only been here for 3 to 4 month and I’m still trying to learn a complicated system (and I have not really even touched the code base yet), and where my previous experience are all more development-based. Still, that is no excuse. I just need to get results. No one is paying me to make excuses.

I just feel if I can get over these few humps then I will be good. If I don’t, then it will be regretful.

Sometimes I feel like I want to do more development–regular development. But…I don’t want to give up. I will travel down this path until either I come out of the woods, or I die a horrible death mauled by some insane software quality engineer bear…(I don’t like the term software engineer. Then again I’m not right in the head either)

Arghh, that was corny as f**k.