Wednesday, December 3, 2014

Firefox ESR for Selenium


Firefox ESR For Selenium

Firefox

One thing to note for Selenium is it is sometimes behind Firefox releases. So I recommend installing the Firefox Extended Support Release. To download this go to : https://www.mozilla.org/en-US/firefox/organizations/

After downloading the installer, you will have to extract it

sudo tar -xvjf firefox-*.*.*esr.tar.bz2 -C /opt

Next is to back up your existing Firefox

sudo mv /usr/bin/firefox /usr/bin/firefox-old

Next is to link the new Firefox ESR

sudo ln -s /opt/firefox/firefox /usr/bin/firefox 
For the first time you run, execute
gksudo firefox


Tuesday, September 9, 2014

PHP Tools

PHP tools

So now we now a linux mint virtual machine with php. So we can start coding in php. But it is not easy to code in vi. So I have searched on what will be a nice IDE for PHP. Can I recoment SublimeText. As of writing SublimeText 3 is currently in beta testing. But I find it stable enough to use.



So for this post, let me run through the installation of SublimeText3 and a couple of nice plugins for it.

SublimeText3



Go to SublimeText3 download page and click on the Ubuntu 64 bit link. A pop up will appear and click on save file. Once it is done, double click on the downloaded deb file. The package installer window.



Click on the Close button and then the Install Package button. This will then ask you to just enter your password again. This will then start the installation.Click on close after the installation. You can now close the package installer. You can now find SublimeText3 under Programming Menu






Now open up SublimeText3 and we can start installing some plugins.


Plugins



First off, we need to install Package Control . Package Control is your easy way to install and update SublimeText packages. There are tons of packages that you can install for SublimeText that does different things.



You can go to Installation page. In this page, you can find the command that will be used to install Package Control. You will have to copy the the SublimeText 3 version of the command.

Now go back to SublimeText3 and click View -> Show Console. And then paste the copied text to the console.



Now its time to download more plugins.



First off, may I suggest SublimeCodeIntel. This will help in in code completion and function look up. I find it a bit flaky at times, but when it works, it works like a charm.

To install click on Preferences - Package Control. Type Install Package. Then type SublimeCodeIntel. After installation, you should restart SublimeText3. I highly recommend updating the user settings. To do so click on Preferences -> Package Settings -> SublimeCodeIntel -> Settings - User.




This will open up a blank file. In this file, paste this :


 {"PHP": {
            "phpExtraPaths": [],
            "codeintel_scan_files_in_project": true,
            "codeintel_max_recursive_dir_depth": 5
        }
 }



Next up is a syntax checker. This will be a couple of steps process. First among the packages that we need to install for syntax checking is SublimeLinter.  To install, go to Preferences -> Package Control. Type Install Package. Type in SublimeLinter and select SublimeLinter. This will install the package. I again recommend to restart SublimeText3 after the installation.



SublimeLinter won't work as is, it needs the linter package for our development tool of choice. For me I installed SublimeLinter-php. To install, go to Preferences -> Package Control. Type Install Package. Type in SublimeLinter-php and select it. I may sound like a broken record at this point, but, restart SublimeText3.



Some of the important shortcuts to remember are :

ctrl+k, l :  Lint the current view.
ctrl+k, n : Go to the next error.
ctrl+k, p : Go to previous error
ctrl+k, a :  Show all errors.


Now we are ready to go to Selenium.

Thursday, August 28, 2014

Learning PHP

Problem

I have recently taken a new post as Lead QA Automation Engineer. The environment that the developers are writing code is in PHP. So I decided to also use PHP for automation. In this case I can easily get help from the developers. Problem is, I have no experience with php. So I have to start learning.

So first step for me was to set up an environment. First off, I want to give credit to where credit is due. I want to credit Juan Treminio's blog for getting me started. His blog is Setting Up a Debian VM, Step by Step. But I want to update this a little bit as I wanted to use Linux Mint in this experiment.

What you need

For this tutorial, I will be using Oracle Virtual Box. This makes it really easy and inexpensive if you make mistakes. You can also use other virtualization technology out there. I am just more familiar with this one.

Next, you will need a ISO from the Linux Mint website. I suggest you get the latest version. There are several types of iso that you can download. For the sake of this tutorial, I will be using the cinnamon installation image.

Lets Start The Install

So that I don't repeat Juan's blog, just follow his steps on setting up the virtual machine and mounting the iso. After you start your vm the first time, come back here.

  • You will be in the Mint Desktop. You will have to click the "Install Linux Mint" icon on the desktop.


  • Next steps you will be choosing your Language and click Continue.
  • Then the installation will check the system requirements. Just click Continue.
  • Next will be the installation type.  Just choose the default option and click Install Now.
  •  
  • You will choose your timezone and click Continue. Next will be you keyboard layout and click Continue.
  • Next will be to enter your identity.  Your name, computer name, username and password. And click on Continue.
  • This will start the installation of Linux Mint. Go and grab something to eat or drink.
  • After the installation, you will be asked to restart. Just click on the Restart Now.
  • After the VM restarts, you will have to enter your password.
  • At this point it will be a good idea to just run the update.  Click on the shield by the clock on the lower right hand side. Then click on the install updates.

  • Click on Devices and Insert Guest Additions CD image...Then click Run
  
 
Congratulations. Your OS is installed and up to date.

Install services

First off, open up a terminal window. Install some mySql

sudo apt-get install mysql-server mysql-client

Answer Y to any prompts that you will get asked during installations.It will ask you to enter a root password.

Next Install Apache and PHP. You will run the following :

sudo apt-get install apache2 openssl
sudo apt-get install php-pear php5 php5-cli php5-common php5-curl php5-dev php5-intl php5-json php5-mcrypt php5-mysql php5-xcache php5-xdebug libpcre3 libpcre3-dev curl 

You will need to install oauth extension from pecl

sudo pecl install oauth


You need to edit both /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini and add the line to the extension section.

extension=oauth.so

Next stop is to install composer.

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer 

Now you have the basic stuff that you need to run php. With your favorite text editor in linux, create a new file and call it version.php. put in that file . Then in a terminal window run php version.php. Your console should now print information about your php.




Congratulations! You are done setting up the basics. Watch out for the next one.



Thursday, December 9, 2010

When to Say NO

Here is a good story for you. Tell me if what you will do the same thing or would have done it differently.

Day 1 of 15. Your team was over capacity. Day 6 of 15 business say that they want some new investigation done. Really important to get done. This was brought in so that we can fix the problem next iteration. So this was all fine by me as this does not affect QA. I am happy. We are still at capacity. Then day 8 of 15, they suddenly make this investigation story a fix it up story. I was asked if we can do it? He even dangled that the developers will do an automated integration test. I said if I will be satisfied with the test then I have no problem with it.

I then asked the manager does he know the complexity of the change. He said he really did not know. So that time I said NO. Main reason why I said no is was this change localized to a component or will it be for all components? I would not know how much testing I needed to do. And time was running out.

Next day, day 9 of 15. I was able to talk to more informed people such as the developer. They knew better on the scope of change. We discussed on how big the changes were. One of the change was fairly localized to one component. The second change was more tricky. It was updating an underlying the change. It will definitely affect 2 of the components they just have to be careful in updating the project so that they only update the 2 components and not the rest. So armed with the knowledge of only needing to test 2 rather that 8 processes, I said lets go ahead with the change.

So developers continue with their development. And they are done and code checked in on Day 11 of 15. So we can now start testing. Problem happened, this information was not disseminated to the rest of the development team. so guess what happened? Code was built but SCM updated all projects with the configuration that we said should not be applied to all projects.

So we talked to SCM and asked if we can revert the configurations back. At first SCM was saying it was only a configuration change that was changed. No functional change. So as QA I should not worry about the other processes. My QA instinct was just saying that I should not just release something that I am not worried about. I cannot take their word for it. I have to prove it. So I kindly said NO again. I just won't let a piece of code go out in the wild with out testing. So we asked him if he can revert.

He tried to revert it back. And .....POW! Another problem blocks the road. There was another team touching the same code base. And they have updated the parent project. So now it won't be easier to revert the changes. So what are my options at this point?? Well, I guess I have no more options. I am stuck with this configuration. I have to do a regression on the rest of the components.

So what was scheduled to be a quick 1 day test turned out to be a 2.5 day testing effort. and we were not done till day 14 of 15.

Should I just have stayed with my first NO? Was there a place that I have done better?

I honestly don't know. We will find out after we release the code. If we do solve problems ( Major problems ) then I would say what we did was the right thing to do. But if the changes does not do anything, then I would have say we need to look back.

Wednesday, March 3, 2010

What is in your toolbox??

I often get the questions by my peers on what do I use for different kinds of QA related activities. So here are a few tools that I use. Hope this helps you.

Test Prep
During test preparation I often use CTE XL. This is Classification Tree Tool. This is a nice and simple way to lay out all your objects and classes and easily come up with your test cases. It can export to different format. I usually just export the test cases to an excel spreadsheet.

Another way to prepare a test is by doing a mind map. A good free tool to use is FreeMind.This is free easy tool to do your mind mapping documents.

In testing, I am usually face to creating data that I need to enter in the systems. And at times, I feel like I keep using the data over and over and over. So a tool that I found that helped me with generating test data is generatedata. Before you can use this, you need to set up a couple of stuff before hand.


Testing
Some quick automation tool, I use WatiJ(pronounced as wattage). It stands for Web Application Testing In Java. I don't have a lot of experience using java, but I found it easy enough to use referring to te API documentation. This needs a java ide. I really like IntelliJ and Eclipse. IntelliJ is not a free application while Eclipse is a Free application. Watij is a free software, so help is a little bit limited. There is a good user group that is really helpful.

Another good automated testing tool is QuickTest Pro from HP. This is a commercial so support is really good. I recommend this software to 2 of the companies i had work for. And for both times, it has really worked great. I would not recommend this for smaller companies as it can be expensive if not use wisely.

Another free tool that I use is Fitnesse. Now this tool is a bit tricky. Cause the whole organization should commit to using this to be successful. This needs some time from the development team as well to do the the Fitnesse Fixtures in the code base.

For testing the UI of a web page, I often use IETester. This allows you to switch easily from different Internet Explorer versions.

Some outcomes for testing is a big text file. And often, to test the outcome is to compare 2 text files. A good tool to use is WinMerge.

Tuesday, September 1, 2009

Why QA???

Are you in the QA field? Was this your first choice? Did you ever see your self doing this 5 years ago or as for me 10 years ago?

Well, I am in the QA field. I have been in this field for about 10 years now. Did I ever see myself doing this 10 years ago? I would say no. This was definitely not my first choice of career path.

I started of in University. When I chose to take up Computer science as my field of study. This was in the dream, that someday I will be a good programmer perhaps. I attended school. Did my projects in different programming languages. Back then the popular programming languages where C and C++. My projects were good. I enjoyed doing it. I said to myself "Yes! I can do this. I can be a good programmer."

Then time to graduate and find my first paying job. It was hard to get a good job. and I finally landed a job with a good international company. But alas, it was not a job to do programming or analysis. It was a job in QA. I heard about this in school. But that really did not strike me as a thing that I would like doing. But the promise of the company was, that if there was a project opening that has programming, that I can go to the project. So, with this hope in mind, I said yes to the oppurutinty.

So i took on the role of QA in my first project. And this was about 1999 where the Y2K was a big deal. So there were tons of test that needed to do before Y2K hits. It was busy in our department. As I was the new kid on the block, I was deligated to execute the test plans. As I was doing that, I was starting to find bugs. And the people around me was appreciating the things I was finding. I said to mysel "Not bad. Fells Good."

As time passed by, I was givwen more responsibilities. Starting to do test plans and even some automation. This really challened my way of thinking. This also brings out another aspect of QA that they also do programming. I was starting to have fun. And I started to be doing well. I said to myself "I like this. I can be reallyy good with this"

And this was the start of my love to QA. So if you asked my 8 years ago if I wanted to be in QA. I would have said Yes. And if you ask me, what I want to be in 5 years. I would love to stay in the QA field.