Wednesday, November 24, 2010

Enterprise Tester installation

Enterprise Tester Installation :
http://www.catchlimited.com/index.php?page=enterprise-tester
Register this website and login
Download Enterprise tester
Unzip Enterprise tester
Double click on Enterprise tester and wait for complete installation
Install 'mysql'
Create Database as 'etester'
Go to the 'Enterprise Tester' home path >> open web.config file
setup the mysql configuration
( add name="Default" connectionString="Server=machine ip address;Database='database name';Uid=root;Pwd=root;" )
Open the 'Enterprise tester'  from start menu program files
It will open browser (firefox) with "localhost/Enterprise tester/home
There is 3steps to complete the configuration
1. It will ask the Admin details
2. Enter the organization details
3. Enter the license key from registered website then 'save'
( License key you will get from registered website, Just login the website then come here to the 3rd step, access link 'click here' then it will take you to the generate license page, enter your server key and click 'generate license' button)
4. login with admin then use it...


Enjoy with work ...hahaha

Thursday, July 22, 2010

QTP checkpoints

There r 8types of check point in QTP. they are
1.Standard check point:It checks the GUI objects properties
2.Database Check point:It checks the backend data of the application
3.Text check point:It checks the text in a application
4.Text area check point:It checks the perticular text area in a application
5.Bitmap check point: it checks the bitmaps in an application. It takes perticular area as a bitmap.But Image check point checks only web application
6.Accessibility Check point: It can checks the accessibility of the web application only.
7.XML check point:It can checks the XML web application
8.XML check point from file: It can checks the XML code for the perticular file

TestLink

This is the complete flow including the troubleshooting steps for most commonly faced issues:

1. Download Testlink from the site

http://sourceforge.net/projects/testlink/files/

2. Extract the source file using any free zip extractor

3. Now download any PHP Server; I’ve chosen the WAMP (http://www.wampserver.com/en/download.php), which is a very simple server administrator

4. WAMP uses port 80 by default, which is commonly used by many applications (including IMs like skype), so better change it to any other port (say 81)

Go to this file Drive:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf and change the port number

5. Now that the WAMP installation is done, place the extracted Testlink folder to the ‘www’ directory of the WAMP folder. (WAMP folder can be found on the installed drive directly Drive:\wamp)

6. Now, start the WAMP server and type the URL http://localhost:81/testlink/install/index.php

7. While this page is being opened, open your MySQL client (I use MySQL yog free edition) and create a database with name ‘testlink’ on your localhost

8. Extract the data tables and data inside the tables (using SQL restore) on this database. Both these SQL files can be found inside the test link folder that you’ve extracted. The location is Drive:\wamp\www\testlink\install\sql\mysql

a. open mysql console
b. create database testlink;
c. use testlink;
d. grant CREATE,INSERT,DELETE,UPDATE,SELECT on testlink.* to admin@localhost;
e. set password for admin@localhost = password('admin');

9. Back at step 7, the installation page would have been open on your browser, give the location credentials:
DB URL: localhost:3306
DB User id, Password, Optional User ID and Password

10. Done, you are ready and can access the testlink

Most of the users find the below error after configuring test link & opening the page

Deprecated: Function ereg_replace() is deprecated in C:\wamp\www\testlink\lib\functions\lang_api.php on line 173

This is because the ereg command is no more used in the PHP versions > 5.2. So the solution for this is either reverting back to PHP 5.2 or lower (or) do the following tweak:

Go to the Drive:\testlink\lib\functions\ and go to line number 173 in the file ‘lang_api.php’. Change this line:
$t_lang_var = ereg_replace( '^TLS_', ", $t_var );
to be this line:
$t_lang_var = preg_replace( '/^TLS_/', ", $t_var );

Grinder

1. download grinder
2. download jython
3. unzip grinder and jython
4. create "setGrinderEnv.cmd" file

{{

set GRINDERPATH=D:\grinder-3.2  # grinder path
set JYTHON_HOME=D:\jython2.2.1 # jython path
set GRINDERPROPERTIES=%GRINDERPATH%\examples\grinder.properties # properties file path
set CLASSPATH="%JYTHON_HOME%\jython.jar" # jython jar file path
set CLASSPATH=%CLASSPATH%;%GRINDERPATH%\lib\grinder.jar # grinder jar file path
set JAVA_HOME="C:\Program Files\Java\jdk1.5.0_16" # java path
PATH=%JAVA_HOME%\bin;%PATH%

}}

5. create "startAgent.cmd" file

{{
pushd ..
call bin\setGrinderEnv.cmd  #
echo %CLASSPATH%
java -cp %CLASSPATH% net.grinder.Grinder %GRINDERPROPERTIES%
popd

}}

6. create "startConsole.cmd" file

{{
call setGrinderEnv.cmd
echo %CLASSPATH%
java -cp %CLASSPATH% net.grinder.Console
}}
7. create "startProxy.cmd" file
{{
call setGrinderEnv.cmd
java -cp %CLASSPATH% net.grinder.TCPProxy -console -http > ..\grinder.py
}}

8. Record test scenario
    a. open command prompt, go to the grinder path "D:\grinder-3.2\bin"
    b. enter this "D:\grinder-3.2\bin> startProxy.cmd"
    c. open browser and set the proxy setting from tools " Tools > options > Advanced > Network > settings"
        i).select manual proxy settings option
        ii).Http proxy > localhost : 8001
        iii).SSL proxy > localhost : 8001
        iv).select "SOCKSv5
        v).No proxy for > localhost, 127.0.0.1
        vi).click "ok"
        vii).click "OK"
    d. enter url for your application
    e. do some actions in your application
    f. click "stop" at recording console
9. It will generate a file with recording script like "grinder.py" in the grinder folder

10. copy this file  "grinder.py " in to the example folder

11. open the "D:\grinder-3.2\examples\grinder.properties" file
    1. set the script file name at "grinder.script = grinder.py "
    2. set the processors "grinder.processes = 2"
    3. set the threads "grinder.threads = 10"
    4. set the run times "grinder.runs = 10 "
    5. set the grinder console host name "grinder.consoleHost = 192.168.2.65"
    6.

12. start console
    i). open the command prompt and go to the grinder path like "D:\grinder-3.2\bin"
    ii). enter "D:\grinder-3.2\bin>startConsole.cmd "
   


12. start Agent
    i). open the command prompt and go to the grinder path like "D:\grinder-3.2\bin"
    ii). enter "D:\grinder-3.2\bin>startAgent.cmd "

13. go to the console window -> set the direcotory

14. go to the console window -> distribute files

15. go to the console window -> click strat process

Sunday, July 18, 2010

Sending Emails using QTP via Gmail, Hotmail and other Email Service Providers; Using Windows CDO (Collaboration Data Objects)


Sub sendmail()
  Set iMsg = CreateObject("CDO.Message")
  Set iConf = CreateObject("CDO.Configuration")

  iConf.Load -1 ' CDO Source Defaults
  Set Flds = iConf.Fields

  With Flds
   .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
   'Enable SSL Authentication
 
   .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
   'Value of 1 enables basic authnetication, 
   '2 enables NTLM Authentication, 
   '0 disables Authentication

   .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "xyz@gmail.com"
   .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =  "Your Email's Password"
   .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"

   .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
   'Value of 2 means send using port
   'value of 1 means send using a local SMTP server
   'value of 3 means send using Exchange Server

    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
   'The SMTP Port which must be enabled in your network by ISP or local Firewall

    .Update
  End With

  With iMsg
   Set .Configuration = iConf
   .To = "xyz@gmail.com"
   .CC = ""
   .BCC = ""
   .From = "xyz@gmail.com"
   .Subject = "Test email sent from QTP Professional"
   .TextBody = "This is a test email sent using Gmail's SMTP Server with port 25. Blog info is - LearnQTP.info"
   .AddAttachment "c:\LearnQTP.info.pdf"
   'Local path of the file to attached
   'For attaching another file, 
   'repeat the line with new path
   .Send
  End With
End Sub

Comparing two pdf documents


If oPDF.ComparePdfFiles ("D:\first.pdf","D:\second.pdf","D:\executionresult.txt") =Truethen
reporter.ReportEvent micPass ," diff between two pdf files ""File as same"
Else
reporter.ReportEvent micFail ,"diff between two pdf files ""Files are not same"
End IF

Wednesday, July 14, 2010

Difference between Smoke & Sanity Software Testing


Smoke Testing: Software Testing done to ensure that whether the build can be accepted for through software testing or not. Basically, it is done to check the stability of the build received for software testing.

Sanity testing: After receiving a build with minor changes in the code or functionality, a subset of regression test cases are executed that to check whether it rectified the software bugs or issues and no other software bug is introduced by the changes. Sometimes, when multiple cycles of regression testing are executed, sanity testing of the software can be done at later cycles after through regression test cycles. If we are moving a build from staging / testing servers to production server, sanity testing of the software application can be done to check that whether the build is sane enough to move to further at production server or not.

Difference between Smoke & Sanity Software Testing:
  • Smoke testing is a wide approach where all areas of the software application are tested without getting into too deep. However, a sanity software testing is a narrow regression testing with a focus on one or a small set of areas of functionality of the software application.
  • The test cases for smoke testing of the software can be either manual or automated. However, a sanity test is generally without test scripts or test cases.
  • Smoke testing is done to ensure whether the main functions of the software application are working or not. During smoke testing of the software, we do not go into finer details. However, sanity testing is a cursory software testing type. It is done whenever a quick round of software testing can prove that the software application is functioning according to business / functional requirements.
  • Smoke testing of the software application is done to check whether the build can be accepted for through software testing. Sanity testing of the software is to ensure whether the requirements are met or not.