Sunday, September 25, 2011

80% of the Words Used In the Quran Can Be Learnt in Two Months

If you are looking for an easy way to learn Quran the following site would be very helpful.

Start with the video embedded in this site. That gives a lot of useful information on how to use the material.

The brother who made the video, points to an external site and explains how to use it. I tried the links and found some of them are moved, but within the same site, and you can access them using the links provided.

Try it out, and Insha Allah you may benefit a lot!

Wednesday, September 7, 2011

KDE 4.7 is Delayed in Debian

I think I owe a blog post here because I see a lot of users visit my KDE 4.6 being delayed post. Whenever I login to debian-kde IRC channel, the topic says "No ETA for 4.7." I don't have any other information on the topic. I did look at regular places where I check for info, but could not find any.

As debian is a voluntary project, we can't expect them to commit to a deadline. People have their own lives to live. But, I tried the IRC twice to get some information on why they explicitly say "No ETA for 4.7." It seems there is no special reason for delaying 4.7 other than the usual one, need more helping hands.

I hope people join their hands with Debian.

Update: KDE 4.7 is now available for Debian. 

Defining QA Process for Teams Which Don't Write Test Cases

As I am leading a small QA team on an Open Source company, I have the task of defining the QA Process. The formal QA cycles, and process won't work here.

We have two major teams, one is working on the open source product, and the other one working on customizations of the open source product. The Open Source team is more agile, while the customization team being less agile. We have projects for which presales and estimation done in 15 minutes, development and testing finish in one day.  The largest project so far is two and a half developers working 3 months together, and two testers working both on manual testing as well as automation of basic test cases.

Writing test cases is not in the business model. We send the feature specification to customers and get it signed off before the project starts. The practice of signing the test case document is not there. I have spoken to the project managers, and none want the QA team to write test cases to their products. Since test cases are not signed off, they don't carry much business value for project managers.  For a project that runs one month, they don't want the QA team writing test cases for one week.

Following are some of the reasons why test cases don't provide a good solution to the company.
1. Specs are not written in a way so that business scenarios are easily visible. Rather it describes a small chunk of functionality. This makes it harder to write test cases before the release is made.
2. Test cases are useful if the same set of test cases are executed in multiple cycles. This, usually, is not the case. A story/functionality, is usually tested thoroughly in only one cycle. And there will be defect verifications in one or two more cycles and that's it. This reduces the value for the test cases a lot, and people prefer ad hoc.

I find it harder to define a testing process where test cases are not practiced. Since testing then goes undocumented, it is harder to monitor and control it.

I know that Agile teams don't rely on formal test cases, and they have a different view on testing. I am currently going through  "Agile Testing" by Lisa Crispin, hoping that it will shed some light to the problem.

Today, I found something interesting in the book, which I would like to share with the rest of the world.
Agile testing doesn’t just mean testing on an agile project. Some testing approaches, such as exploratory testing, are inherently agile, whether it’s done an agile project or not. Testing an application with a plan to learn about it as you go, and letting that information guide your testing, is in line with valuing working software and responding to change.

Sunday, September 4, 2011

Automating Web Applications - How I Got Started - 3

I am going to explain a tool that I created which stands in between Record and Play Selenese and robust automation code.

You better read my previous post to see why I came up with such a solution.

The purpose of the solution is

  1. the tool should be usable by non-technical people as well
  2. a single modification of the web application should break only a single unit in the automation suite. For example, if a text box is renamed in the application, it should be possible to fix it only in one place and correct the suite.
  3. should allow re-usability. i.e. We should be able to build a block of solid piece and reuse multiple times
  4. should support parameterizing the data. 
  5. the learning curve should be small, and after that users should be writing test cases straight away without worrying much about building large frameworks.


Bearing the above considerations in mind, I decided to go with a "hack-around of Selenium IDE."
The design had three layers
1. Action layer - containing all the actions. An action is the atomic element which performs a logical action and placed inside an action file.
2. Template layer - Template files are there just to contain action files, and other template files. They are similar to directories which contain files and other directories.
3. Data layer - Data files contain the data of a template file. Parameters of the template file, and the data file should exactly be the same. Data in the data files will be copied to templates, and then to action files.

Let me give three sample action files here. Name of the action is the name of that particular file.

Name of the action file: OpenURL 
param:URL
<tr>
   <td>open</td>
   <td>#URL#</td>
   <td></td>
</tr>

Name of the action file:TypeSearchItem
param:SearchItem
<tr>
  <td>type</td>
<td>id=lst-ib</td>
<td>#SearchItem#</td>
</tr>

Name of the action file: ClickGoogleSearch 
param:
<tr>
<td>clickAndWait</td>
<td>btnK</td>
<td></td>
</tr>


The below template file could hold the above action files.

Name of the template file: SearchGoogle

param: URL SearchItem

OpenURL URL
TypeSearchItem SearchItem
ClickGoogleSearch 


Then I create a data file to hold the data of the above template. It would look like below.

param: URL SearchItem
google.com,mailtoirs.blogspot.com
google.com,orange
google.com,apple
If I run the tool, it will map the data file to template file, correctly replace the parameters in the action files and produce one selenese script which can search google for "mailtoirs.blogspot.com", "orange", and "apple", one after the other.
  • Action files are usually created by recording in the Selenium IDE, and then modifying it a bit for parameterizing, and saving as different files. Creating the above example took me less then 5 minutes. 
  • The final resulting selenese script is also run using the Selenium IDE. 
  • If google changed the name of the search box one day, I would have to rename it simply in one action file (TypeSearchItem), and run the tool to regenerate the selenese script. Had this been a manual recording, I would have to replace it in all three searches manually. 

What I described so far is the essence, and a simplified view of the tool I created. The tool actually contained another layer, suite, which puts templates together and generate a selenium suite.

We got a project where the tool could be used immediately. The project was fairly complex, and the duration was 2-3 months. Myself and another new person, who was a fresher to the field, had to complete the manual testing as well as the automation within the duration of the project. The concept and tool became very handy, and with some struggling, we were able to successfully automate the product to a certain level.

I was hoping to automate the entire base product using the tool. But, as usual manual testing were prioritized, and I did not have a chance to automate for a while. Then, as days passed, the initial concerns and assumptions changed, and that paved the way to another technology to be used. Details will follow in the next post.

Wednesday, August 10, 2011

Automating Web Applications - How I Got Started - 2

If you have'nt read part-1 of the story, please read it so that you will get the full picture.

I appreciate the good design in IBM three tiered architecture, but I believed there could be better object oriented ways. The three tiered architecture gave me some good insights on how to maintain reusability, maintainability and the importance of a good design. It actually inspired me towards a different design.

I imagined a page as an object containing three other objects. componets, actions, and verifications. Each of these will have respective page specific items. Test cases are put in a different layer. A simple test case would look like the following. Think of the below as a psuedo code, just for explaining the concept, not a real one.
Login login = new Login("URL");
login.actions.login(username, password);
if(!login.verifications.verifySuccessfulLogin())
  System.out.println("login no successful");
else
  System.out.println("Successfully logged in as " + user );
I designed this without knowing that there is a similar, but better pattern called pageobject design.

As I told in the previous post, this was a slack-time task, and though I was doing it with a lot of hope and passion, I was the only one doing it. A lot of code representing a lot of pages need to be complete to cover even smoke testing level. But, if the classes are ready, and API is ready, progress from Smoke Testing level to Medium/Thorough testing would be much quicker. The point is, a lot of coding needs to happen to achieve some minimal real progress. No one in the management realized that this is another development project, which demands a lot of programming skills and resources (people). After almost 1.5 years, I still seriously doubt that  they have a good understanding of the load of the task.

After about three months, my supervisor, who is also a very good friend of mine asked a simple question. "Do you think we would be able to make it by the end  of the year if we go in this pace". This let me re-think the whole progress and the target I would achieve at the end of the year.

By that time, only one test case was done. I had managed to ramp up another colleague, the one and only resource I had for sharing the work (only if he was free of other tasks). He was struggling to catch up with Java, and not so enthusiastic because the company is not Java based, rather PHP based. When we got into any Java specific issues, none was there to help. Another major risk was the entire product, the web application, was being re-written using symfony framework at that time. So, the product was changing. One traditional rule in Automation is "Not to Automate Against A Changing Product". The product has to be stable, before starting automation. So, by the time I write another ten more test cases, most probably the entire module would have been re-written making the automation code outdated.

Given all the above facts, I decided this is not the way. This prompted me to go for another solution. I'll explain that in the next post.

Automating Web Applications - How I Got Started

I am in software QA stream. And an Open Source company whose main product was a web application. I was asked to write functional test automation for the web application as the company wants to push in that direction. At the time of the request, i.e. early in 2010, functional test automation was not a high priority, but completing manual testing on new releases had higher priority. Functional test automation was a slack time task, and I was new to the company and web applications.

I had hands on experience in working in a full fledged functional test automation project, trying to automate IBM DataStage using Rational Functional Tester. We were doing automation as per the three tiered architecture. Three tiered architecture separates, appobjects into one layer, tasks into another and test cases into another. Test cases call tasks, and tasks are achieved by manipulating appobjects. Check this link out for more details on the architecture. Though I find the concept not being very much object oriented, still that solution was a good one, scalable and maintainable. So, my whole experience was around IBM DataStage, which is a desktop application.

Now, in the new company, it was about web applications. It is not a web site, to emphasize, but a real desktop like web application. They had done some automation already, which was selenium IDE recordings. I was told that selenium scripts would fail sometimes without proper reasons. I was OK with it because that is something common to any automation suite. But, the degree of emphasize they put on that fact was quite puzzling, and then when I tried things out some other interesting facts also came along. One of the colleagues, who had contributed a lot to the scripts, told me that when the scripts are run in high speed, things often fail. So, running in a slower speed would make many of the test cases pass. I did some googling and could not find such an issue with Selenium. And the scripts did not have verifications built in. Renaming a single texbox in the application would necessitate updating so many places in the scripts.

Slowly the responsibility of automating the entire product came unto my head. My previous experience and expertise taught me that record and play back is not the solution. A definite NO to that direction. Then I had to do some research, to find out a better way to automate the application. The company was willing to invest in commercial products, even though open source technologies are preferred. But, If I pushed them towards big commercial products, I knew there would be too much expectation on me. And if I later find out that we are not going anywhere with that tool, that would impact my career negatively. I wanted to stick to Open Source solutions for so many reasons, including my love towards Open Source. And I am still glad, that I didn't go behind any commercial software.

My research suggested WebDriver would be the best. I started with that, but there were two main problems. I was just a QA guy with some programming knowlege, and WebDriver was just a jar file without any IDEs and frameworks to kickstart. There was no one in the QA team, who could guide me how to proceed in this direction. We had a development team, and I had a good relationship with them, but they don't have the slightest idea of how a functional testing framework would look like. So, I could not talk to them about my needs. As I had been in an IBM Rational Functional Tester project, I knew how a matured functional test project would look like. The pretty fancy test reports, the ant commands that would let us run the test suite with different configurations, the object mapper interface which would give us the properties of the components, and so many other stuff. You can check this link to have a smell of it. All of them are missing, and all I was left with was one lonely jar file and the task of automating the entire product.

My stubbornnes asked me to write all the verifications using if conditions, and some research pointed me that firebug could show me the properties of the components. The dear Eclipse IDE was already there. And I started writing the code for functional testing.

That's how my journey began. Read the next post to see how things moved on.




Sunday, July 31, 2011

அன்புத் தொல்லை

அன்புத் தொல்லை என்ற வார்த்தைக்குப் பல அர்த்தங்கள் இருப்பதை நான் பல நேரங்களில் உணர்ந்ததுண்டு. பொதுவாக எல்லோருக்கும் தெரிந்த ஒரு அர்த்தம் தான் ஒருவரது அன்பு மிகுதி அடுத்தவருக்கு, அதாவது அன்பு செலுத்தப்படுபவருக்கு தொல்லையாக அமைவது. உதாரணத்துக்கு நீங்கள் ஒருவரது வீட்டுக்குப் போகிறீர்கள் என்று வைத்துக் கொள்வோம். அவர் உங்களுக்கு இரண்டு தோசைகள் பரிமாறுகிறார். நீங்களும் வயிறு முட்டச் சாப்பிடுகிறீர்கள். அவர் உங்களை இன்னும் இரண்டு சாப்பிடச் சொல்கிறார். உங்களால் முடியவில்லை. இருந்தும் அன்பு மிகுதியால் வற்புறுத்துகிறார்.  இங்கு சாப்பிடச் சொல்பவர் அது மற்றவருக்கு சங்கடம் தரும் என்றோ, தொல்லையாக அமையட்டும் என்றோ நினைத்துச் செய்வது இல்லை. அவர் ஒரு அன்பு மிகுதியில், நல்லெண்ணத்தில் செய்து விடுகிறார், ஆனால் அது தொல்லையாக மாறி விடுகிறது. இது தான் பொதுவாக எல்லோருக்கும் தெரிந்த அன்புத் தொல்லை. 

இதுவல்லாத இன்னொரு ரகம் இருக்கிறது பாருங்கள், அது தான் ரொம்ப மோசமானது. என் வாழ்வில் நடந்த இரண்டு சம்பவங்களை சுருக்கமாக சொல்கிறேன். அப்போது உங்களுக்குப் புரியும் இது எத்தனை மோசமானது என்று. இதைப் பற்றி இத்தனை விலாவாரியாக  எழுதுவதற்கு இரண்டு காரணம். ஒன்று, இது மாதிரி ஆசாமிகளிடத்தில் நீங்கள் கவனமாக இருக்க வேண்டும். இரண்டு, இது போன்ற தவறுகள் உங்களால் மற்றவர்க்கு நடந்து விடக் கூடாது. 


சம்பவம் 1
நான் திருமணமான புதிதில் ஒரு உறவினருடைய வீட்டுக்கு விருந்துக்குச் சென்றிருந்தேன். கூடவே என் மனைவியும், மாமியாரும், இன்னும் இரு சிறுசுகளும் வந்திருந்தனர். போன இடத்தில் எம்மை நன்றாகவே கவனித்தார்கள். விருந்திலும் உபசரிப்பிலும் நான் ஒரு குறையையும் காணவில்லை. என்னோடு கூட  வந்தவர்களுக்கும் எந்தக் குறையும் இருக்கவில்லை. இரவு 8 மணியளவில் சாப்பாடு ஆரம்பமானது. ஒரு பெரிய மேசையில் ஒன்றாக அமர்ந்து சாப்பிட்டுக் கொண்டிருந்தோம். நேரமும் ஓடிக் கொண்டிருந்தது. 
அந்த ஊர் கிட்டத்தட்ட ஒரு குக்கிராமம். இரவு 8:30 மணிக்குப் பிறகு டவுனுக்கு போக பஸ் கிடையாது. 8:20 நெருங்கும் போது நாங்கள் சாப்பிடுவதை நிறுத்தி புறப்படத் தயாராகப் பார்த்தோம். அங்கு தான் ஆரம்பித்தது அன்புத் தொல்லை. பரவாயில்லை, மனது நிறைய சாப்பிட்டு விட்டுத் தான்  போக வேன்டும் என்று அவர்களோ ஒரே அடம். நாசூக்காகச் சொல்லிப் பார்த்தேன். சாப்பாடு நன்றாகத் தான் இருந்தது, வயிறும் நிரம்பியது, நீங்கள் ஒரு குறையும் வைக்கவில்லை என்று முடிந்த வரை சொல்லிப் பார்த்தேன். அவர்கள் விடுவதாக இல்லை. இறுதியாக, கடைசி பஸ் தவறினால் சிக்கலாகி விடும் என்பதையும் சொல்லிப் பார்த்தேன். அப்போதும் விடுவதாக இல்லை. எனக்கோ தர்ம சங்கடமாகி விட்டது. அவர்கள் வீட்டில் ஒரு வான் இருக்கிறது. சில நேரம் அதில் எம்மில் டவுனுக்கு கூட்டிச் செல்ல இருக்கிறார்களோ என்றும் ஒரு சந்தேகம்.  

ஒரு புறம் எரிச்சலாக இருந்தாலும், பயமாக இருந்தாலும், இன்னொரு புறம் அவர்கள் மனதை நோகடிக்கக் கூடாது என்பதற்காக அவர்கள் இஷ்டப்படி இருந்து விட்டே வந்தோம். மணி 9  தாண்டி விட்டது. கடைசி பஸ் தவறியும் விட்டது. அவர்கள் வீட்டில் வான் சும்மா தான் இருந்தது. ஆனாலும் இதில் போகிறீர்களா என்றோ அல்லது எப்படிப் போகப் போகிறீர்கள் என்றோ ஒரு வார்த்தையாவது கேட்கவில்லை. வீட்டு வாசல் வரை வந்து வழியனுப்பி வைத்ததோடு அவர்கள் கடமை முடிந்தது என்று உள்ளே சென்று விட்டார்கள். அந்த ஊரில் இரவு 9 மணி என்பது 12 மணி மாதிரி என்று அன்று தான் எனக்குத் தெரியும். பஸ் மாத்திரமல்ல, ஆட்டோ கூட அந்த இரவில் தேடிக் கொள்ள முடியவில்லை. எவ்வளவோ அலைந்து திரிந்ததன்  பின்னர் இன்னொரு சொந்தக்காரரின் வீட்டைத் தட்டி, அவரது கூரையில்லாத லாரியின் பின்புறத்தில் நான், என் மனைவி, வயசான மாமியார், மற்றும் இரண்டு வால்கள் என்று எல்லோருமாக டவுனுக்கும் வந்து சேர்ந்தோம்.
 
இங்கு இதில் எனக்கு வந்த ஆத்திரம் என்னவென்றால், நாங்கள் பஸ் இல்லாமல் அவதிப்பட வேண்டி வரும் என்று நான் தெளிவாகச் சொல்லியும், எங்களை வற்புறுத்தி சாப்பிட வைத்தது தான். அவர்கள் செய்வது எமக்கு தொல்லையாக மட்டுமல்ல, பெரும் சிக்கலாகவும் அமையும் என்பதை தெளிவாக சொன்ன பின்னரும் கூட அன்பு செலுத்துகிறோம் என்ற பெயரில் எம்மை சிக்கலுக்குள் தள்ளி விடுவதைத் தான் நான் பிழை என்று சொல்கிறேன். இவர்கள் உதவ வேண்டும் என்பதற்காக உதவுபவர்கள் அல்ல. தனது மனத்திருப்திக்காக பிறருக்கு உதவுபவர்கள். பிறர் அதனால் தொல்லையில் விழுந்தாலும் இவர்களுக்கு அது பற்றி அக்கறை இல்லை. நான் உதவி செய்தேன் என்ற உணர்வு இவர்களுக்குப் போதும். 

என்னைப் பொறுத்தவரையில் இவர்களது உணர்வுகளைப் பெரிதாக மதித்து எம்மை நாம் துன்பப் படுத்திக் கொள்ளத் தேவை இல்லை. ரகம் அறிந்து பழக,  நடக்க அவனவன் தெரிய வேண்டும். இல்லையென்றால், அன்புத் தொல்லை ஜாக்கிரதை தான்.

 இதே மாதிரி ஒரு சம்பவம் அண்மையில் நடந்தது. அதை பிறகு ஒரு நாள் எழுதுகிறேன்...