Please follow Selenium Java Training projects before selenium video tutorials and later on Selenium Tests Framework, step by step selenium test reporting framework!

Tuesday, April 7, 2015

Selenium Tests Framework is now open source


What next, after diligently following Java training videos and Selenium training videos ?

How about a Selenium Test Framework which gives detailed step by step report of each action carried out on web page? something like - 


Selenium Tests Framework (STF) is behind such awesome report and not just this, there are tons of other features.
STF is available on git hub
You can clone the project and build STF jar to use in your selenium project
Or better, fork it, make modifications and submit pull request. This way your features to STF would be available for other to use. Is not open source wonderful?
So what are you waiting for ? ;-) 

Friday, March 27, 2015

Prepared database statement and casting

Though database testing is not directly possible from selenium but if you have followed selenium database testing video then you know how you can use jdbc to perform database operation from within your java selenium tests. 

I came across an interesting problem today when I had to insert value in a database table. On the surface corresponding database insert code looks very easy - 




But its execution fails on line 16 with error - 

ERROR: column "user_id" is of type integer but expression is of type character varying
  Hint: You will need to rewrite or cast the expression.
  Position: 163

The problem lies in the following line - 

queryBuilder.append("VALUES ('TRUE',?,2,'gift code [BoGJRhmTmImKJlrlFnBlZd+j2dBO3M9a]','50000','1060262','1');");

Herein user_id is represented by "?" and later replaced by real user_id in following line - 

updateCreditAccount.setString(1, UserModel.getUserId();

But user_id is of type integer in databse hence it needs to be cast from character to integer. This can be done by replacing "?" with "?::integer" in "VALUES" statement. Hence modified code looks as (Notice the change in line - 7) - 



And this works now :)

Sunday, February 15, 2015

8th JMeter Training Video - Using CSV data set configuration

This is 8th JMeter training video Session. You may like to watch all previous JMeter training video sessions before continuing with this video. This session covers -


  • Using JMeter Template “Recording Template”
  • Using csv data set configuration to parameterize data
  • Location of CSV file 
  • HTTP Request Sampler - “Embedded Resources from HTML files” > “Retrieve All Embedded Resources”
  • Run test with thread count 2
  • View csv test data in JMeter HTTP sampler 
  • View downloaded resources in View Results in Tree listener

8th JMeter training video session can be watched online. 

ShareThis

Fork me on GitHub