Monday, July 29, 2013

TOMCAT STARTUP ISSUE :INFO: The APR based Apache Tomcat Native library which allows optimal performance in production


add a system property to the launch configuration of the tomcat server in eclipse.
 -Djava.library.path=c:\dev\tomcat\bin
And download the tcnative dll (or libnative.so for Linux) and put it in the bin folder.

Thursday, July 25, 2013

Start multiple instances of Selenium RC's and hub

Download seleniumgrid1 .navigate to the  folder and

1. create a batch file called rc_grid1.bat and paste the below

ant -Dport %1 -Denvironment="*firefox"  -DseleniumArgs="-userExtensions user-extensions.js " launch-remote-control

2.create a batch file called rc_hub and paste below

ant launch-hub

3.Launch hub and multiple RC's by creating another batch file called start_hub_rc.bat

start cmd /k Call rc_hub.bat 4444
pause 20
start cmd /k Call rc_grid1.bat 5555
start cmd /k Call rc_grid1.bat 6666
start cmd /k Call rc_grid1.bat 5570
start cmd /k Call rc_grid1.bat 5575
start cmd /k Call rc_grid1.bat 5580
start cmd /k Call rc_grid1.bat 5574
start cmd /k Call rc_grid1.bat 5578
start cmd /k Call rc_grid1.bat 7777
start cmd /k Call rc_grid1.bat 8888
start cmd /k Call rc_grid1.bat 9999
start cmd /k Call rc_grid1.bat 1010
start cmd /k Call rc_grid1.bat 1011
start cmd /k Call rc_grid1.bat 1012
start cmd /k Call rc_grid1.bat 1013
start cmd /k Call rc_grid1.bat 1014
start cmd /k Call rc_grid1.bat 1015
start cmd /k Call rc_grid1.bat 9998
start cmd /k Call rc_grid1.bat 1016
start cmd /k Call rc_grid1.bat 1017
start cmd /k Call rc_grid1.bat 1018
start cmd /k Call rc_grid1.bat 1019
start cmd /k Call rc_grid1.bat 1020
start cmd /k Call rc_grid1.bat 1021
start cmd /k Call rc_grid1.bat 1022
start cmd /k Call rc_grid1.bat 1023


You can see multiple rcs launched and connected to the hub.

Wait in batch file

  1.  pause 20: it will wait for 20sec's ,but u need to press any key to continue.
  2.  TIMEOUT /T 20: it will wait for 20sec's
  3.  ping -n 600 127.0.0.1 > NUL:This will wait for 600/60 =60sec's i.e 1min

Wednesday, July 10, 2013

Tuesday, April 30, 2013

Restart the windows remote server


To restart after shutdown remote machine.
·       Write below in cmd line
·       Shutdown /r

Stop listening to particular port in windows



·      To get the pids for respective port : 
         type in the below command in command prompt.

        netstat -a -o 

     This will output 

 Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             I2LT189:0              LISTENING       2408
  TCP    0.0.0.0:135            I2LT189:0              LISTENING       924
  TCP    0.0.0.0:443            I2LT189:0              LISTENING       2408
  TCP    0.0.0.0:445            I2LT189:0              LISTENING       4
  TCP    0.0.0.0:1110           I2LT189:0              LISTENING       2888
  TCP    0.0.0.0:2002           I2LT189:0              LISTENING       2092
  TCP    0.0.0.0:3306           I2LT189:0              LISTENING       2244
  TCP    0.0.0.0:4444           I2LT189:0              LISTENING       8984
  TCP    0.0.0.0:5357           I2LT189:0              LISTENING       4
  TCP    0.0.0.0:5800           I2LT189:0              LISTENING       2520
  TCP    0.0.0.0:5900           I2LT189:0              LISTENING       2520
  TCP    0.0.0.0:5938           I2LT189:0              LISTENING       2408

·       To stop listening to port ,use taskkill command.
     taskkill /F /PID <process id>

·       eg:To stop listening to port 4444,type in below
     taskkill /F /PID 8984(where 8984 is process id for 0.0.0.0:4444 )