Testing express

Testing express

Sunday, November 4, 2012

Performance Testing - An Experience

The best part our minds is that it always wants something new to do. I had an opportunity to do some performance testing which was something different from my daily routine.

Performance testing is considered to be part of non-functional testing group. The term itself suggests that in this type of technique, testers measure the performance application, server or the database. This process is similar to any other testing process, only difference is the requirements and goals. 

My approach was to keep it simple. Start with a plan. Since I did not have any specific requirements, I had  to define a baseline requirements based on conversation with server architect & database architect.

My first step was to define a baseline requirement which was my performance goal. Now few questions arise in my mind

Are these goals for the whole application? or for specific components? I made it clear again by discussion with all stakeholders that this was for the whole application. This helps in moving forward because you need to clear with what you are doing.

Next step was to choose a tool for performance testing. what tools must I use open-source or commercial? so, I started analyzing performance test tools that will fulfill my goals. since the project did not have a budget to afford a commercial tool at this stage of project, I had a very easy decision, I had to choose a open-source tool. After some analysis, I chose Jmeter for several reasons.

-open source & free
-easy to use
-has lot of features 
-most important it fulfills my goal

Do we have an environment for performance test? because if you do a performance test anywhere, then it will have consequences like results may not be correct, others may get affected who are using the same environment..etc.

I choose a environment that was under control so that it neither affects the results or any other persons.

We are entering the execution phase now. we have set up the environment and we need to do several runs to determine the results and information during runs.

All runs may not be successful but each run will give important information even if it fails.

After every run there were some steps needed in the environment setup to get the application back to what we call the initial or clean state.

For ever run a report was generated that captured all the details and it was presented to all stakeholders. The architect's did some tuning to see that we achieve the performance goals.

Finally, Performance goals for the sprint were achieved. During this experience I learned a lot of things that I like to share.

1.Baseline requirements are very important, they act as a goal for the performance test
2.Environment must be set up correctly. 
3.Identify factors that can affect the test results
4.Load test tool can simulate a limited no of users from a client machine. we need to know that number.
5.The tests run within an intranet will give different results. This may not be the case in real world scenario
6.Discuss with architect's based on information in test reports, what tuning they are doing for removing the bottlenecks, so that you can focus more in those areas
7.Jmeter has both GUI and NON-GUI interfaces. It makes a huge difference
8.While running tests you need to be observing the activity in server and db.Logs is one of the sources.

I am writing this article as my thoughts flow. It may not be as per best writing guidelines or rules, apologies for that. I will try to improve with each of my write ups.



Wednesday, August 29, 2012

Escape special characters - RubySelenium


We use JIRA as a defect tracking system. For a project we were not able to log defects in JIRA due to lack of time and frequent builds. we instead used google doc to log defects and track them. As the project moved on defects kept piling up. One fine day new manager took charge of this project and suggested to move all defects from googledoc to JIRA. 

The first thought that came to my mind was to use automation tool to log defects. without giving a second thought and not bothering about any other solutions, I started working on it, because It had been a long time since I used automation tool, This was the only reason for not thinking about any other alternatives.

I decided to use selenium with ruby for this task. First I recorded the script with Selenium IDE and then exported it as a Ruby test. when I ran the test I found something strange. I was getting an error "Incorrect password", whereas I was able to login manually into JIRA login page. I was hitting my head to figure out this strange behavior.

I tried to enter a passoword that didn't have special charcters, and the tool was doing it perfectly but when I gave it my original password with special characters, It was not even typing it.At one instance I thought of changing my password to something that doesn't have any special characters, But it was not possible.So I choose to put my query in selenium groups. I got a reply the next day. I want to share that with you.

In RUBY you need to escape the special characters, since my test was in ruby it was not working, when I escaped them with '\' it worked like a breeze :)

Any problem is not a small problem until it is solved 

I hope this post helps if you bump into a similar problem

Sunday, August 26, 2012

HTML5+CSS+JS - Bringing power to browsers



I am amazed at the way browsers use is changing. The buzz word most heard with web developers is HTML5, because it comes with a lot of promise for web developers.

The new elements in HTML5 have helped companies to build games, make the user experience more interactive with audio support. one of the most common terms with game developers is the <canvas> tag. There are quite few libraries that have been built to showcase the power of working with canvas and the results are astonishing. HTML5+Javascript+CSS are becoming one of the powerful technologies to rollout smart apps that attract the users.

But, there are challenges as well like

IE doesn't support the canvas tag
Developed apps must be compatible with browsers and devices
Javascript is not considered to be as robust as programming languages like Java....
Performance issues

Its also a challenge for testers to test the apps built using these platforms, Though some apps are small but still they need to work well on all platforms. Time pressure to rollout apps ASAP still worsens the problems.

I have tried my hands to do some experiment using html5 and see what it is all about, my experience is that it is fun to play with these technologies, It doesn't need a heavy setup as with programming languages, You just need a text editor, and a browsers. The browser have very good debugging tools that makes it more easy. I found a lot of problems both from a developer's perspective and a tester's perspective.

I built a bouncing balls POC using HTML5, CSS and Javascript. It was fun.

I promised myself to jump to next level and build a nice game next time  :)


Monday, July 2, 2012

Version control - Part1


As a tester,

How may times have you encountered this

1)You recieved a wrong build?
2)A closed defect is reproducible?
3)Fixes are missing from build?
4)QA environment has different version from dev environment?

Software versioning and revision control is one of the most important activity of  a software project. There are many freeware and commercial version control tools available in market, The main aim is to help developers manage code.

Why should a tester know about version control? what is the use? A tester gets a deployed build to test from a deployment team or a development team. why does he need to worry?

Because, This is one of the potential areas of bugs being created.

For Example, Imagine a software project team divided into different groups: server team, client team, graphics team, database team etc. Eventhough they all work on different groups of a project, they all use a common source control tool to manage and maintain their code. This is infact a place where many things can go wrong. That is why project managers or leads define a common structure and best practices for all the groups to follow so that they do not make mistakes.

In theory this looks easy but in practical, it is very hard to avoid mistakes. Sofware development is considered a complex activity, As the project scope increase, so does the team size and with the changing dynamics, it is very important to keep every thing in sync.

Today I got an opportunity to attend a session on SVN. It was very interesting. I heard a lot of terms used in the session which I will list out here

Trunk
Branch
Tag
Merge
Conflict
Commit
Update
Repository
Version

In another post we will discuss more about  each of these terms.

Sunday, July 1, 2012

What Testing IS and NOT



A tester is the only person in a software project who has priviledge of knowing the product end-to-end. This is unlike their developer counterparts, who are restricted to certain feature or module.

Testing is considered a natural trait in any person. I feel this is a misconception. Though, testing is a natural activity, but It needs more skills, passion and attitude. Tester's only get better by practice. The more complex the software the more challenging it is for any tester.

There may be few simple applications, which gives the tendency that testing is simple. For me, testing is an interesting & challenging activity, where I can use and apply my skills. Testing is not bounded to one specific area, unlike developers who are labeled by the technology. EG; Java developers, C++ developers. Even there are many agencies or companies who try to label testers as database testers, windows testers. This is irrelavant.

Testing is similar to solving puzzles where you have different categories of puzzles, similarly different applications in testing terms. The skills needed are same but strategies may differ.

A tester who is testing a banking application cannot use the same technique/methodologies when he is testing a massive multiplayer game. There is nothing as a "Banking applications" tester or a "Gaming" tester. A tester who can test banking application can test gaming application as well and vice versa. The only thing that changes is domain.

Because testing is considered a natural trait, we can draw inspiration from different fields of professions for ideas & skills. Tester's can wear different kinds of hats based on situations

Testers are like
Detectives - Investigation skills
Journalists - Question asking abilities
Scientists - Analysis, problem solving
Politicians - Diplomatic
Military - Team management & leadership skills

Testing is NOT
-a simple activity
-last option
-something everyone can do
-the only activity of finding bugs
-about finding mistakes

Monday, June 25, 2012

Recursion - A simple example in ruby

class Recursion 
   def sum_positive(n)
 
     if  n==1
        $t = 1
    else
        $t1= n.to_i + sum_positive(n-1)
    end


   end

end

s = Recursion.new
puts s.sum_positive(9)


Problem: Write a recursive Ruby function sum_positive(n) that has one parameter n that represents a positive integer. The function should return the sum of the first n positive integers. Your solution must use recursion and should not have a loop in it.
Eg;
sum_positive(5) must give

5+4+3+2+1 = 15 as output

Do you have a better solution?

Why every release is a "ThRilleR"


I bet you too might have experienced this. Thrillers have
  • Tension
  • Suspense
  • Excitement 
"A thriller is villain-driven plot, whereby he or she presents obstacles that the hero must overcome" - wikepedia

I agree with the above statement from wiki. Now you need to fit in the characters in the above statement.
Don't take it seriously ;)

I always keep thinking, why this happens?

Improper planning
Lack of motivation in team
Lot of changes
Unexpected deadlines
Unreasonable expectations
Lacking a good leader
Too much commitment
Casualness

Add on, if you can share from your experiences

"Paani da rang vekh ke, akhiyaan cho hanju rul de" = "Seeing the color of water, tears roll down my eyes" -AK