Wednesday 5 January 2011

Batch file creation to run the selenium server

Hi,
    I have tried to create a batch file to start the selenium server for three different environments, Almost it takes one whole week for me to create a batch file because i am new to this batch file creation.

So i would like to give the sample batch file code so that you can modify as per your requirements.

Sample batch file code:


ECHO OFF
SET JAVA_HOME="C:\Program Files\Java\jdk1.6.0_20"
SET ANT_HOME="C:\Program Files\ant"
SET PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%PATH%

echo Please Enter The environment
set /p Key= Here -^>

echo.

:BEGIN

IF %key% == tst GOTO TST
IF %KEY% == dev GOTO DEV
IF %key% == uat GOTO UAT

:TST
echo YOU HAVE ENTERED TST ENVIRONMENT
java -jar path to \selenium-server.jar -port 4440  -multiwindow -htmlSuite "*firefox " "website url" "path to\MainSuite.html" "path to\Results.html"
GOTO END
:DEV
ECHO YOU HAVE ENTERED DEV ENVIRONMENT
ava -jar path to \selenium-server.jar -port 4441  -multiwindow -htmlSuite "*firefox " "website url" "path to\MainSuite.html" "path to\Results.html"
GOTO END
:UAT
ECHO YOU HAVE ENTERED UAT ENVIRONMENT
ava -jar path to \selenium-server.jar -port 4442  -multiwindow -htmlSuite "*firefox " "website url" "path to\MainSuite.html" "path to\Results.html"
GOTO END
:END

Try this and do magic in your automation world

All the best

Monday 3 January 2011

How to run liferay's selenium script in jmeter for performance testing

Hi friends,
please click the link which is mentioned below so that you can solve this problem easily.

url: http://www.mpowerglobal.com/web/neelu/home/-/blogs/how-to-run-liferay-s-selenium-script-in-jmeter-for-performance-testing?_33_redirect=http://www.mpowerglobal.com/web/mpower-india/blog%3Fp_p_id%3D115%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-2%26p_p_col_count%3D1

How to solve permgen space error while starting the tomcat

HI ALL,
A week ago i have configured hudson continuous integration tool for one of my project, In that i should need to start tomcat server through bootstrap.jar using .xml file but i couldn't start it, reason is memory out of bound exception ie. permgen space error.

Here i would like to share my approach to solve this problem.

Steps to resolve the permgen space error while starting the tomcat through bootstrap.jar

Step 1. Create a build.xml file to start the tomcat server. sample code is mentioned below.

Sample .xml file

<?xml version="1.0"?>

<project name="markettravel" basedir="." default="all">
<target name="tomcat-start">
<java jar="path to /bootstrap.jar" fork="true">
<jvmarg value="-Dcatalina.home=path to tomcat-6.0.26"/>
<jvmarg value="-XX:MaxPermSize=512m"/>






In above code i have added one argument to allocate the perm memory size(jvmarg value="-XX:MaxPermSize=512m").

Step 2:

Now include this .xml file path to hudson tool and start building the project now you never see memory out of bound exception in console.

Happy using hudson.