Testing express

Testing express

Friday, May 5, 2017

Automation Perspectives & Misunderstandings



This observation is from the Indian IT companies point of view(I don't say all, but what I have worked with and those that I heard from my colleagues & friends):

There are 2 types of testers, Manual testers and Automation testers

Automation tester can switch to manual testing role anytime but vice versa is not that easy!

Automation is not same as development

All automation tools are same, If you know Selenium then by default you will definitely also know 
the UFT's, the Cucumber's, the Carrot's  :P ? why? because client needs it.  

Automation is nothing but few automated data entries, clicks, verification..etc

If you know automation, you are bound to be in any interview panel that has the word "Automation" in the job requirements document.

Automation tests are like the high precision tests that should never fail, I don't care if it's a licensed tool or a free tool.

What? you have completed the automation runs? I don't believe you ! where are the numbers? After giving numbers. how many defects you found using your automation scripts? none/one? what is the value you are providing?

We are facing issues with existing framework and tool, which other tool should be consider? let's start evaluation.


Friday, May 22, 2015

Selenium tips: Locate elements that have same attributes for all elements


Some times a group of elements have same attributes for all elements, in that case if I want to click or select any specific element from that group, it will be hard using any location strategies. Here is one solution that I came up with

WebDriver driver = new FirefoxDriver();
driver.get("file:///D:/SameName.html");
driver.manage().window().maximize();
List<WebElement> cbox = driver.findElements(By.name("chk"));
cbox.get(cbox.size()-1).click();

In the above code we are getting all elements using locator name and value "chk" into a List
Then we are calling the get method on the list object by passing the index value and the performing the action.


Tuesday, May 19, 2015

Selenium : Mistakes and Learnings

I had a long pending issue in a selenium script. Problem was, after succesfully completing a flight booking transaction, I wanted to verify the confirmation message and get the pass result.This is the way I had implemented

public void isFlightConfirmationSuccessful(){
System.out.println(flightConfirmation.getText());
if(flightConfirmation.getText()==("Your itinerary has been booked!")){
System.out.println("Flight Booked Successfully");
if("more data" != null){
backToFlights.click();
}else
{
logOut.click();
}
}else{
System.out.println("Flight Not Booked");
}

}

Even though this method flightConfirmation.getText() would return the same string as expected "Your itinerary has been booked!" ,

still I would get the result false.

I was missing a java concept here "==" is not same as ".equals"

".equals" checks the equality of content
"==" checks the equality of references

This is the code that passes the test

public void isFlightConfirmationSuccessful(){
System.out.println(flightConfirmation.getText());
if(flightConfirmation.getText().equals("Your itinerary has been booked!")){
System.out.println("Flight Booked Successfully");
if("more data" != null){
backToFlights.click();
}else
{
logOut.click();
}
}else{
System.out.println("Flight Not Booked");
}
}


Sunday, May 17, 2015

Java Concepts - Strings literals

what is string literal?
it is a sequence of characters between quotations
Eg; "apple"

what is string literal/constant pool?
Its a collection of references to string objects
String objects that have references from string constant pool live on heap memory
String s = "apple";
s is a variable in string constant pool referencing to string object "apple" that lives on heap

if I write
String s1 = "apple";
s1 is another variable in string constant pool that is referencing to same object "apple"

s.equals(s1) // will return true because equals checks contents of objects
s==s1//will also return true because equality operator checks for referential equality

String s = "mango";
Here, reference of variable s is changing from "apple" to "mango", but "apple" object is still present in heap memory. Hence, strings objects are Immutable(cannot be changed)

s.equals(s1);//will return false because now s is referencing to object "mango" and s1 is referencing to object "apple", which are 2 different objects

String object referenced from the string literal pool is created when the class is loaded

String literals are not eligible for garbage collection, the object is always reachable through the intern() method.

source: http://www.javaranch.com/journal/200409/Journal200409.jsp#a1

Monday, May 4, 2015

Assertions in TestNG - HardAssert & SoftAssert

TestNG is a unit testing framework used by developers, but it has also gained popularity among testers.

It makes life easy of a tester while writing tests.
This post will be focused on one of the important features of TestNG called Assertions.

what is assertion?
A statement that asserts that a certain premise is true

In Testers language, Assertion is a check/validation to compare the expected and actual outcome.

All the assertions are part of the Assert class

Example of a assertion

Assert.assertEquals(boolean actual, boolean expected) 
Asserts that two booleans are equal.

More assertions can be found here : http://testng.org/javadoc/org/testng/Assert.html

There are 2 types of assertions

Hard assertions & Soft assertions

Hard Assertion : Throws an AssertException once Assert fails and continues with execution of next test in the suite. For example if you have a bunch of assertions in a @Test, If one assertion fails, the whole test fails.All assertions after the failed assertion are skipped once a assertion fails.

Soft Assertion;  soft assert allows to continue with next @Test without throwing any exception

Hard assert:
  @Test(priority = 2)
  public void ffPageElementsTestHardAssert() {
     Assert.assertTrue(ffPage.ff_Type_oneway.isDisplayed());
     Assert.assertTrue(ffPage.ff_Type_roundtrip.isDisplayed());
     Assert.assertTrue(ffPage.ff_PassengerCount.isDisplayed());
     Assert.assertTrue(ffPage.ff_DepartingFrom.isDisplayed());
     Assert.assertTrue(ffPage.ff_DepartingMonth.isDisplayed());
     Assert.assertTrue(ffPage.ff_DepartingDay.isDisplayed());
     Assert.assertTrue(ffPage.ff_ArrivingIn.isDisplayed());
     Assert.assertTrue(ffPage.ff_ReturningMonth.isDisplayed());
     Assert.assertTrue(ffPage.ff_ReturningDay.isDisplayed());
     Assert.assertTrue(ffPage.ff_ServiceClass_EC.isDisplayed());
     Assert.assertTrue(ffPage.ff_ServiceClass_BC.isDisplayed());
     Assert.assertTrue(ffPage.ff_ServiceClass_FC.isDisplayed());
     Assert.assertTrue(ffPage.ff_Airline.isDisplayed());
     Assert.assertTrue(ffPage.ff_Continue.isDisplayed());   
  }
Soft assert:
  SoftAssert sa = new SoftAssert();
@Test(priority = 2)
  public void ffPageElementsTestHardAssert() {
     sa.assertTrue(ffPage.ff_Type_oneway.isDisplayed());
     sa.assertTrue(ffPage.ff_Type_roundtrip.isDisplayed());
     sa.assertTrue(ffPage.ff_PassengerCount.isDisplayed());
     sa.assertTrue(ffPage.ff_DepartingFrom.isDisplayed());
     sa.assertTrue(ffPage.ff_DepartingMonth.isDisplayed());
     sa.assertTrue(ffPage.ff_DepartingDay.isDisplayed());   
  }
Soft assertions can be helpful when we are validation forms.

Sunday, March 30, 2014

Back after a long gap

It's been exactly 1 year since my last post. I have moved to my home town for a new job. It took some time to settle down. My work place is far away from my home, I was not able to spend much time to blog, But I have promised my self to continue from where I had left in whatever possible time I get.

The domain of my new job is completely different from my previous jobs and the work culture is also different. The application which I am working on is vast and there is a big team that takes care of quality & development. Tight schedules as usual and ever changing requirememts.

We also have a automation team that struggles to run automation scripts on each build because they have a list of problems that never end.

It's been a long time since I have kept my self updated with selenium, With my new laptop, I need to set up the environment from scratch.While I am writing this post, softwares are already getting installed in the background.

Hope to keep up my blogging pace.By the way this is my first post this year and happy about it, I believe anything first is always exciting & helps us to motivate ourselves.

 

Saturday, March 30, 2013

Automated build deployment

As a tester, the time we spend on each task is important, we need to keep identifying solutions that can save our time and effort. I will discuss one such solution we implemented during automated build deployment.

There are many tasks that we repeat several times, this will be exciting first few times when this task is new but once you get used to it, it becomes repeatative.

As part of my work I am responsible for deploying the client side builds to web server. There is a fixed process that needs to be followed always, this situation is appropriate for automation and the good thing is, it does not need much time and effort. First, I will highlight the manual process that is followed to achieve this task.

1.Checkout the code from svn with a specific revision number to folder in local machine
2.Run a shell script to minify the buid
3.Rename the minified build as per the naming convention
4.Deploy build to server using any of the ftp clients, we used winscp.

This process takes 15-20 mins for each build
If there is a mistake in build like
Incorrect revision no
Missing file
Incorrect svn url
This process needs to be repeated

The solution was simple, we used a shell script to automate this whole process. the only things we needed was svn commands, winscp commands & dos commands

This helped us reduce total deployment time from 15-20 mins to 5 mins

With the help of systems team we made this solution more optimized and brought down the deployment time from 5 mins to 1-2 mins

The systems guy introduced us to TeamCity which is a continous integration server, it has a lot of features that can help us achieve automated build deployment.
Here are the general steps for setting up the deployment taken from teamcity site, This can vary based on your requirement.
  1. Write a build script that will perform the deployment task for the binary files available on the disk. (e.g. use Ant or MSBuild for this)
  2. Create a build configuration in TeamCity that will execute the build script.
  3. In this build configuration configure artifact dependency on a build configuration that produces binaries that need to be deployed
  4. Configure one of the available triggers if you need the deployment to be triggered automatically (e.g. to deploy last successful of last pinned build), or use "Promote" action in the build that produced the binaries that need to be deployed. Consider using snapshot dependencies in addition to artifact ones and check Build Chains tab to get the overview of the builds.
  5. If you need to parametrize the deployment (e.g. specify different target machines in different runs), pass parameters to the build script using custom build run dialog. Consider usingTyped Parameters to make the custom run dialog easier to use.
  6. If the deploying build is triggered manually consider also adding commands in the build script to pin and tag the build being deployed (via sending a REST API request).
    You can also use a build number from the build that generated the artifact.
Build Script could be shell script or ant This build script will have the above manual process in form of commands, once the configuration is completed you can just click a "run" button from the dashboard, deployment is done automatically and the results displayed on dashboard. There is also facility to check the log file to debug if deployment fails.
You can also add auto sending of emails if a build is deployed successfully to the relevant user group. This can be added in script. 

There is also facility to pass parameters to build script



Monday, February 18, 2013

Selenium


This is my first post on selenium - A web based automation testing tool. I got in touch with selenium when I  was hired to automate an application and I choose to use selenium. I must admit that it was confusing for me at the start, but as I read and did more practice, I was better than before :)

I had used Watir before using selenium, It was natural for me to compare both. Advantage of selenium was that it had IDE unlike watir which made selenium look more easy. but today I feel there is no advantage because I don't use IDE at all. In real time projects most people don't often use IDE for automation.

For  a new tester who wants to learn automation, IDE is a good way for getting the feel of automation, motivating testers to do more, BUT there comes a point during the learning curve of a tester, where recording and running script is no more happy happy or motivating.

Next level requires some sort of scripting or programming skills, this is a challenge for some one who has never written a single piece of code. Either you give up and boast you know automation till record and playback or you start the challenging journey to learn.

Selenium provides a decent list of options to choose as a supporting language, this is more confusing to someone who has never programmed, which language to choose?

Initially its confusing & struggle to kickstart, but persisting will help you overcome and add to your learning curve. There are different tools provided by selenium that you need to understand and choose the options that you want to use for your automation.

SeleniumRC, Web-Driver, Grid, IDE, Different language options

Selenium Groups is a good place to join, you can hear and ask, you get lots of valuble learning tips.

In addition, there are different tools used if you are developing automation as a fulltime project, it almost similar to any develpment project that needs versioning tools, build tools, development environment..etc

Will be talking more about selenium experiences in upcoming posts

Have a good time :)

Friday, February 1, 2013

Is Playing a Game same as Game testing?(part2)

This is a continuation from my previous post

There are different categories of games, I will categorize them in only 2 ways

1.Play free
2.Play with real money

Play free, as you all know are available on many game sites and social networking sites, you just need to login and then play.

There are another category of games, gambling-oriented games that let people win or loose actual cash. Here, you create an account, deposit money and play....that's it.

Console games - Here you need to purchase hardware and the game software to play, you need to invest cash to buy

There are other ways of making a player invest real cash in a game in the form of buying virtual currency, gifts...etc

Now let me comeback to the topic of Game testing and Playing.

If you are a tester who is testing the first category of games that are for free or the second category for real cash, the approach of testing would be different. there would be different strategy because the aim of building the games is different in each case from a business perspective. The is taken into consideration while testing the games.

Now, If I am a game player or user who loves to play game, why the hell must I bother about the business perspective. My aim is entertainment. I want to play the game to enjoy. I will play the game and only complaint or get frustrated if I face some problem while playing, either I report the problem or don't comeback to this game or site. If I like the game I may give my feedback and suggest for more features.

A game player plays for himself to enjoy while a game tester tests the game from different stakeholders perspectives and sees that game adds value to both end-user and company.

In addition, a game tester also has to be technical to understand the the system which provide different features apart from the game itself. For example

1.If you are testing a single player client based game developed using client side technologies like javascript, html5,css, major testing efforts are focused on the game functionality, user experience and compatibility

2.If you are testing a multi player game eg; gambling games, which has client-server and database and a whole group of supporting servers, the testing scope and efforts increase. This kind of system is complex and a challenge for testers. Integration testing, database testing, system testing, backend testing, performance testing need to be considered in addition to the client side testing.

A tester needs to understand the whole system and should be able to create good tests that can uncover defects.Test team needs to be in sync with other teams in order to rollout a good game. The competition in the gaming market demands new features quickly to retain users and attract new one's. This puts pressure on  all teams including QA to rollout quality games ASAP.

The severity or importance of a missed critical defect in a game is felt when

1. your game crashes at peak user traffic and your users are seen on a competitor's site :)
2. player looses real cash eventhough he has won the game
3. game is not playable on a popular device
4. player's game is reset to level1 after he has crossed 10 levels spending hours on clicking next level

If you still feel that playing a game is same as testing a game you are kidding me? :)

I am not aware of how the console based games are tested or how the beta testers work. I would be interested in knowing that.

Is Playing a game same as Game testing?(part1)

Game testing is not what most people assume it to be. Yes, I said ASSUME. It's pity that people judge with whatever limited knowledge they have. I feel sorry for them, because every one has freedom to form their own opinions.

Few examples
1.I play free games on my mobile to pass my time
2.We are a group of friends who play for fun during breaks
3.I play to test my gaming skills
4.I earn money by playing gambling games
5.I am a professional online gamer

What do you call all these people in the above examples

Gamers?
Users?
Game testers?

Isn't there a difference in playing a game and testing a game?

Yes there is, this is what interests me and I will elaborate on this interesting aspect.

It is very natural to assume that playing is testing and testing is playing, but I would like to point out while playing do you really care about anything other than winning the game or reaching next level?

Every game's intention is to attract a user and make them involved in the game so that user gets addicted and keeps coming back. and a user's skill improves as he plays more and more and achieves new levels.

Now how is a game tester different from a user who plays a game

A tester needs be in control before he has the task of testing a game. there could be a tendency to get involved in a game. BUT here is the difference between a game tester and a game user

A game tester wears different hats to test the game to find bugs, these hats can be

F-hat - Functionality
U-hat - Usability
C-hat - Compatibility
UI-hat - User interface(graphics, colors, effects, animations)
E-hat - Entertainment(enjoyment, challenging)

A game user wears only one hat
E-hat - Entertainment

The hats concept I have used from the famous author Edward de bono's classic - "Six Hats" for thinking skills, this helps us in testing different aspects of a game. 

When I say games, there are different categories of games and the user experience is also different. will continue this in next post...stay tuned

Sunday, January 6, 2013

First post this year - Automation Buzz

Don't get desperate to build castle in one day.

The context is, testers doing manual testing suddenly realize that they need to learn automation, because one of his friends told that automation is mandatory in resume these days.

So, my dear friend, goes to a automation tools forum and asks a question.

"I am new to automation, please guide me how I can learn it quickly, send me code, sample examples, tutorials...blah...blah..blah".

On one hand it's good that my friend is quick to act, as the saying does "Better late than never". But still, he needs to calm down and think, think and think.

He has got a good start and now he needs to plan how he will achieve this goal, what are the methods to achieve this goal.

-Ask yourself why you need to learn automation tool
-Research on what automation tools are available.
-What technologies they support
-Does it support the application you test in your company
-Do you need any programming knowledge
-Ask friends who have experience in automation
-Install tool, follow tutorials, get hands dirty, read, do and reflect

I can keep writing more...

Automation is good if applied sanely, but it cannot be a quick fix for each and every testing problem.

I just realized, this is my first post of this year.

Happy New Year :)


Thursday, December 20, 2012

Rip the Pessimism


I was interacting with a Junior team member and he was saying that, "There is no importance for QA". He was referring to the speech of head of the company. 

Suddenly I did flashback about the year end speech. I remembered one of the statement that stuck me hard "we have delivered lot of products this year, this was possible due to quick iterations".

I was wondering what does he mean by quick iterations? Now I relate this with the juniors complain that QA is not valued. Then I tried to explain him. How are quick iterations possible? you cannot just develop+fix+deliver. This is not an iteration. develop+test+fix, This is called an iteration. test part is completely Ignored, people think that products are delivered in quick iterations without any testing efforts?
Ignorance at its best.

Quality of build delivered depends on many factors

1.Experience of a developer
2.Expertise on the technology and platform for which the app is built
3.Knowledge about the domain
4.Attitude for delivering quality code that has minimal defects if they are expected to be delivered quickly

These factors are never considered or not spoken at all. They are all assumed that they are part of a quick delivery process.

The role of QA in delivering a product in quick iterations is significant

QA gives developers 
-Freedom to make mistakes
-Experiment with design
-Helps test their solutions quickly
-Provides valuble information
-Give continous feedback

but there is no acknowledgement, because there is a lack of awareness from management. The only thing business/management is interested is to roll out the product as quickly as possible. credit being given to creator but not even a small part to the person who supported to make the product better for release. This is the sad part but we as testers have to live with it. Infact, we can proudly appreciate ourselves because we contribute without any expectations. I draw a parallel with the nature, it gives us so much still we don't appreciate and take it for granted :)

This is what I had to tell my junior team member to motivate him. I could see a broad smile on his face with pessimism turning to optimism.



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

Saturday, May 19, 2012

Adding power to browsers - node.js

As a tester I need to keep myself updated with the latest technologies and tools, So I thought of putting down my learning experiences here

There is a new technology in the javascript land called "node.js", it is being used in one of our projects. This gave me some motivation to explore it.

I was thinking, where does node.js fit in the knowledge/information I have? I started with browser as a starting point. The main basic elements of a browser are HTML, JavaScript & CSS. I will be referring JavaScipt as js, because I may need to use it often. 
what problem does js solve?
Html can serve only static webpages, js can serve dynamic webpages.
I tried to find out more information about js:

1) js is an interpreted language with object-oriented capabilities 
2) js runs in a single threaded environment, meaning multiple scripts cannot run at the same time 
3) Each of the popular browsers use different js engines
IE – Chakra
FF – SpiderMonkey(built in C++), Rhino(built in Java)
Safari – Nitro
Chrome – V8

What is node.js?
"node is a bunch of sugar on top of virtual machine v8" --Quote from Ryan Dhal, creator of node.js

It means node is a tool built on top of google's js engine v8, this is the same engine which chrome browser uses.

What problem does node.js solve?
js has concurrency issues, it is not possible to do several things at same time, node addresses this concurrency problem. you can run multiple scripts at same time. It means response times are fast.

Eventhough node solves this problem, it has some limitations
its still young and immature, you can listen to this video to know more about node from the creator ryan dhal http://www.youtube.com/watch?v=jo_B4LTHi3I

Important points
  • generally js is executed in browsers, with node you can execute js from outside a browser
  • node has a command line tool/console, similar to irb in ruby
  • you can execute javascript file from the command line tool/console using node command
For testers this can be a important tool in the toolkit for learning & exploring js, which is an important element of a browser.