The blog gives you idea of testing and automation testing example of selenium webdriver,SQl and Jmeter, you see the basic example of selenium web driver and get idea how to do automation testing,

Different b/w verification and assertion in selenium ide?




I see two types of check with Selenium – verification and assertion, what’s the difference between tow?

       A verification check lets test execution continue even in the wake of failure with check, while assertion stops the test execution. Consider an example of checking text, Header on a page, you may like to use verification point and let test execution continue even if text is not present. But for a login page, you would like to add assertion for presence of text box login as it does not make sense continuing with test execution if login text box is not present

In simple language, when a test case is executed by Selenium ide and Verify command is come then test is do not stoped by selenium, if some text is not verify or presence in web page then selenium ide execute the next step but in assert case is different, when a test case is execute and assert command come for execution and assert text is not presence then selenium ide stop the execution of that test and other step will not executed.

Installation of Selenim IDE in FF browser



Selenium IDE : Installation in FF browser.
Selenium IDE is a Firefox plugin that does record-and-playback of interactions with the browser.

Step 2: Click on “Download latest released version ” link .
Step 3: One popup saying do you want to allow, Mozilla Firefox to install the selenium IDE or not. Click
              on Allow button.
Step 4: A Light box is open in which you have to click on Install button.
Step 5: When you click on allow button, Firefox will automatically install Selenium IDE, after completion
              of Selenium IDE installation, it will show one pop up saying Selenium IDE installation completed.
              You need to restart your browser to use selenium IDE. Click on Restart Now button
Step 6: Open FF browser and click on the tool, after clicking drop down menu is open check Selenium
              IDE is displayed
Step 7: Click on Selenium IDE, It will launch Selenium IDE window

For selenium IDE there is so many plugins and if we install that plugin, then worked with selenium IDE become Easy

List of plugin is given below

Favorites, Flex Pilot X ,FlexMonkium , File Logging, Highlight Elements
Log search Bar ,Page coverage ,Screenshot fail , Selenium Expert ,Power Debugger
Flow Control ect

Set Java home path in your machine

For selenium Webdriver, you need to install the java in your machine once the java is installed you have to set path of Java in environment variable. below is the steps to set java path in your machine


You have to first install JDK in your system
open command prompt  on your machine
enter 'java -version' in command prompt and check the version of java
------------------------------------------------------------------------------------------------ 
Set java home Java_home = C:\Program Files\Java\jdk1.7.0
Once you have the JDK installation path: - Right-click the My Computer icon on
- select Properties. - Click the Advanced system setting tab on left side of your screen - A advance Popup is open. - Click on Environment Variables button. 




Under System Variables, click New. - Enter the variable name as JAVA_HOME. - Enter the variable value as the installation path for the Java Development Kit. - Click OK. - Click Apply Changes.
set path under system variable path = C:\Program Files\Java\jdk1.7.0\bin;



Find Port number of MYSQL and MSSQL

Identify on which port your MSSQL and MYSQL Database is run, if you find the port number then it help in connection with Database.

MSSQL
Open Run in your system
 Type %windir%\System32\cliconfg.exe
 Click on ok button then check an TCP ip pop-up is open
 Highlight TCP/IP under the Enabled protocols window.
 Click the Properties button.
 Enter in the new port number, then click OK.














MYSQL
you have to open terminal in linux machine
In terminal enter sudo su
enter password
Then write mysql -u root -p in terminal
Enter password of the mysql
Enter "SHOW VARIABLES WHERE Variable_name = 'port';" in terminal then press enter
Check port number on terminal check the below image


HIghlight Command in selenium IDE

How to use Highlight Command in Selenium IDE  & what is the use of Highlight command in Selenium IDE is describe Below.

Highlight command is used to Highlight any header, content, data, button and checkbox on the web page, it is very useful because highlight command shows you that what is the next step is executed by the selenium ide when test case is runned BY selenium ide.

Example of highlight command is given below, when we use hight command, it highlight the header, content, data, button and checkbox with Yellow colour as displayed in below image.

In selenium ide we have to command Highlight and highlightAndWait both are similar same but highlightAndWait use when we have to hight some content then we have to wait for page load.

when we clicked on highlight and highlightAndWait command in selenium IDE it show you how to use in below Refernece panel,
Example :
highlight(locator)
Arguments:
Briefly changes the backgroundColor of the specified element yellow. Useful for debugging.
-------------------------------------------------------------------------------------------------------

Uncheck, Check, CheckandWait, UncheckAndWait command In selenium IDE

Use of Selenium Uncheck, Check, CheckandWait, UncheckAndWait command,



In selenium IDE, Check, Uncheck, Checkandwait and UncheckandWait command is use for Radio button and check box, because when we saw the Radio and check box button we can clicked on it, Check command is use to clicked on the Radio button or check box and Uncheck command is vice versa of the Check command.
Through Selenium IDE we can clicked on radio button and check box automatically,
For automation testing we need the name, Xpath, Css path, id of the element to do proper testing, if check box, Radio button present in the web page so they ID, name Xpath etc. We if we record web page using selenium ide then it take xpath or name as depend on it, but if you write script manually then you have to find the Xpath or name of that element and for find the name or xpath you have to use firebug addons.
Below is the Example of Check and Un check command.



Command Target Value
open                    https://accounts.google.com/ServiceLogin?                  
                          service=mail&continue=
                           https://mail.google.com/mail/
highlight                         id=PersistentCookie
verifyText                      css=span   Stay signed in
uncheck                         id=PersistentCookie

check                            id=PersistentCookie



Check command is used to check the Radio or Checkbox
Uncheck Command is used to Uncheck the Radio or checkbox on the web page.
Check is the command and target is the path of Radio or checkbox button, you can use ID, name, Xpath, Csspath ect. in the target.

"checkAndWait" and "uncheckAndWait" commands
we can use above command when we click on any radio or checkbox button and after clicking on button page take some time to load the content.


Jmeter Basic Description

In Software testing we have mainly two type of testing

  • Function testing
  • Non Function testing

Jmeter is come under non function testing. Load testing is perform to identify system Behaviour under normal and Peak condition (maximum user). Through load testing we can identify load of website or we can say that how many user can access this site without any disturbance or interrupt and  as well as any bottlenecks and determine which element is causing degradation.
E.g. If the number of users are increased then how much CPU, memory will be consumed, what is the network and bandwidth response time.
1000 or more than 1000 user can access the site server goes down and response time of website is decrease.
In market there is so many tools for load testing but Jmeter is a open source tools and it support java language

Jmeter  is use to perform "Load testing" and Jmeter is very helpful to find load or stress of our application, 
Powered by Blogger.