Tuesday, October 6, 2015

Parallel execution of automated check via selenium, behave and docker

We were looking for a solution for executing selenium bases scenarios written in behave in parallel to speed up the execution time. Unluckily behave doesn't have this in build like cucumber  fortunately we came across https://github.com/hugeinc/behave-parallel  in which  upstemsync was just couple of weeks old :)

I already had a picture in mind how would the entire step would work so creating  a demo project wasn't too difficult.

Check out https://github.com/mubbashir/behave-selenium 
Following is screen recoding where I had connected to both nodes via VNC and checks were executed in Parallel  on features level


Wednesday, September 30, 2015

Flashback: Intro to Selenium and Automation- Slide deck

Flashback -  Today while going through some documents on my google drive I came across this presentation which I have used in the past back to give very basic introduction to selenium and automation.

Tuesday, September 15, 2015

My Meeting with James Bach

Last Saturday I had the privileged to meet with James Bach (If you are a software tester, I expect you to know him) and as you can see below I was

I asked him about Sapient Testing->Non Scripted Testing->Testing vs Checking  and how these 3 are different.

He corrected my understanding of Oracles I was thinking about it too specific from the perspective of checks by focusing on pre defined rules whereas "In testing, an “oracle” is a way to recognise a problem that appears during testing."

 We talk about check automation where he told me about this wonderful analogy that think of automated checks as a web and tester as Spider.

The spider is responsible for creating it, managing it, to find the right place and spot for it, a place where there is a greater chance to catch bugs and so on...
Spider Web

And then comes the best part when he played the Dice game with me 

Just after few minutes in the game I felt myself bit overwhelmed :)
Few of the points I took as a take away after that session:

  • Taking clear and correct (Yes correct) is extremely important
  • Simplify problem: Start with the very basic try understand the system with the very basic data
    • Don't get yourself too attached with the basic data, once you are sure how it is working for simple data - "Explore", "Randomise" and Look "Below the surface"
  • Use Focus / Defocus heuristic when in doubt use focus when frustrated Defocus, walk around, change your perspective of viewing 
While we were walking out of the coffee shop he saw me looking at his Cap (those who know me, would know why :-D I wear Cap all the time ) and then he told me he give Cap to tester who work for.

That got some responses with respect to who else has one :D

One thing which made me quite happy was that he was aware of what we Software Testers from Pakistan are doing at the moment mostly because of my dear friend @arslan0644 

I told him briefly about STEP (Software Testers Engagement Programme) an initiative which bunch of my fellow testers took to bring closer the community

Thursday, September 3, 2015

Deleting facebook test users of your app

- Create a new user (We know how to do it, sending the key is sensitive so not adding here)
- You will get a response like:
{ }
- Using the information from the above we can delete the user via the following:

Update the above URL by replacing TEST_USER_ID with the value of id from the first response and TEST_USER_ACCESS_TOKEN with the value of access_token from the first response

The response from it would be true.

Delete the test users once we are done. 

Wednesday, September 12, 2012

What is the most important skill a software tester should have?

What is the most important skill a software tester should have?
In the below video are the answers from a conversation with Tony Bruce at EuroSTAR 2011 last November.

Following are the answers:

0:33  Communication- Fred Beringer @fredberinger

1:14 Ability to Think

1:30 Analytical and Technical 

1:50 Objective look, think(+1) and present his/her thought - Fiona Charles @FionaCCharles

2:20 Communication (+1) 

2:30 Communication (+2) 

3:20 (depends) Critical and Through (for some domain)

3:32 Passion and Enthusiasm  

3:48 Knowing what battles to pick

4:14 To learn - (Andy Glover @cartoontester)

4:43 Has to have many (Curiosity, Intelligence, desire for better software/world  )

5: 25 Question every thing

5:32 Think out side the box (+2)

5:46 Think (+3) - Nancy Kelln @nkelln

6:00 Communication (+3) - John Stevenson @steveo1967

6:12 Not an agile tester (coz it has become a hype)- Stefaan Luckermans @stefaanl

(please let me know if you can identify anyone else or for incorrect identification(s) :D)

Thinking and Communication are the winner.

I believe testers should have technical skills, and thinking is pretty much required in any technical job (O.K. in almost any technical job) but see how many people are saying "Communication".

Communication is important, it's real important for a good tester and doesn't only include the formal, template filling kind of communication i.e. Test Plan, Test Cases, Session Reports, Bug Reports or any  other mode of sharing your findings, but informal kind of communication is equally important.

The informal chit chat with a developer or any other team member about the product, process bug or bug fix helps us a lot. Similarly how to be team member rather then acting like quality police, how to help other team members and how to seek help from other team members (yes any team member with any specific role, developers, DBAs, System Administrators included). 

Similarly we should be able to communicate with other testers to learn from them and we should be able to share our views and opinions about testing with other testers.
No matter how good we are, we can not work in isolation.

Saturday, October 15, 2011

Server side monitoring in JMeter with JMeter Plugins

Like may I needed some server side statistics while running load tests earlier I had couple of Ruby scripts which were gathering my required information on server as CSV file I do have webmin configured on the server but I was still looking for something which is bit more tightly coupled with one of the most famous (easy to use) tool for load testing JMeter.

Here is how to do it:
We just needed one thing JMeter Plugins
 Prerequisite: JMeter 2.4+ or above with a JRE 1.6+
 Download JMeter Plugins 
  • Unzip it and (refer
    • Copy JMeterPlugins.jar to  JMETER_HOME/lib/ext. 
    • Copy zip files content to the Server(s) you need to monitor
  • On each server run JMeterPlugins-HOME/serverAgent/startAgent.sh PORT_NUMBER (refer)
  • Run JMeter (create your test plan as usual)
  • You will see bunch of extra items in Add context menue's item beginning with jp@..  these are the extra plugins we just added via JMeterPlugins.jar
  • Add jp@gc - PerfMon Metrics Collector (refer)
  • Configure your parameters (refer)
  • Run your tests and see server side info
I have use it on Mac and Linux, it should be able to work with most of the systems since its server side agent is build on top of SIGAR - System Information Gatherer And Reporter

Sunday, July 10, 2011

Run Sikuli in (J)Ruby - (J)IRB

I use irb for composing and debugging scripts. Following is what you might need to do inorder to run Sikuli in  IRB:
  1. Install JRuby or via rvm
  2. Copy sikuli-script.jar to  jruby lib
    • cp /Applications/Sikuli-IDE.app/Contents/Resources/Java/sikuli-script.jar $JRUBY_HOME/lib
    • For RVM:
      • rvm list (to list currently installed rubies)
      • rvm use jruby-1.x.x (to use jruby as the ruby implementation)
      • rvm info (to print information about the ruby currently being used)
      • cp /Applications/Sikuli-IDE.app/Contents/Resources/Java/sikuli-script.jar $MY_RUBY_HOME/lib ($MY_RUBY_HOME points to the current ruby home, in this case jruby)
  3. run irb (the irb prompt should list jruby as the ruby implementation, something like jruby-1.x.x :001 >  )
  4. jruby-1.x.x :001 > require 'java'                                                                                      
    •  => true 
  5. jruby-1.x.x :002 > java_import 'org.sikuli.script.Screen'                                                              
    •  => Java::OrgSikuliScript::Screen 
  6. jruby-1.x.x :003 > screen = Screen.new                                                                             
    •  => #<Java::OrgSikuliScript::Screen:0x1dc2dad7>
  7. jruby-1.6.0 :004 > image_path='/Users/mubbashir/Desktop'                                                             
    •  => "/Users/mubbashir/Desktop"
  8. screen.hover("#{image_path}/apple.png") 
    • [info] Sikuli vision engine loaded.
    •  => 1 
 You will see mouse pointer to be moved to apple icon.

With Auto Completion IRB is just a blessing, specially when you want to try some new library or need to run some snippets:

Similarly in script it would be something like:

to run the script ruby script_file_name.rb Just be sure that you are using JRuby ;)