Showing posts with label Software Testing. Show all posts
Showing posts with label Software Testing. Show all posts

Monday, May 15, 2017

Selenium

I. Selenium IDE

1. what kind of app is the selenium IDE?
- Firefox add-on
2. A selenium IDE testcase has 3 columns, command, target and value. what data is stored in the target column?
- element or location where the command is executed
3. By default, in which format does the selenium IDE save a test case?
- as HTML
4. what features are available in selenium IDE to debug an automated test case?
all:
- toggle Breakpoint
- pause/ resume
- step
5. what is the selenium print command?
- Echo
6. what urls does the selenium open command allow?
any
- only the base url
- any url relative to the base url
- any absolute url
7. what is the correct syntax to access the value of a selenium variable called name?
- ${name}
8. what is the difference between assert and verify cammands?
all
- assert commands are more uncommon than verify commands
- typically, an assert command is followed by verify command?
- a failed assert command stops the test but a failed verify command does not do so.
9. in which associative array does selenium store of a test case's variables and their respective values?
- storedVars
10. where can you create your own selenium command?
- in any javascript file, but the preferred name is user-extensions.js for consistency

II. Selenium RC

1. Select the component which is NOT part of selenium suite
- selenium web
2.what is data parameterization?
-using variable test data in place of fixes test data values
3. select the operating system which is NOT supported by selenium IDE
- unix
4. the selenium can
- only test web apps
5. which command can be used to enter values on text boxes?
- sendKeys()
6. select the command in selenium IDe used to open a pagusing the url
- open
7. how do you start the browser?
- selenium.Start()
8. which component is used to run multiple tests simultaneously in different browser and platform?
- selenium GRID
9. which of the following is an incorrect target for pattern matching as in verifyTextPresent command?
-exact:*Sumary
10. which of the following always need a capital letter?
- class names and Strings

III.Selenium commands "Selenes"

1. what are the different modes that selenium uses?
all
- 1
- *firefox and *iexplore
- *chrome
2. how do you start browser?
- selenium.Start()
3. select the browser which is supported by selenium IDE
- Mozilla firefox
4. how many parameters does the selenium object take when using DefaultSelenium?
- 4
5. how do you start selenium RC server with user extensions?
- java -jar selenium-server.jar-user Extensions user-extensions.js
6. which selenium command do you use to run commands in slow motion in selenium RC?
- selenium.setSpeed()
7. which command is used to get the alert box?
- selenium.getAlert()
8. which command is used to for verifying if web element exists?
- selenium.isElementPresent(String locator)
9. which command is used for tying in a textbox?
- selenium.type(String locator, String value)
10.what is the command to load a page?
- selenium.waitForPageToLoad(String timeoutInMilliseconds)

IV. Selenium to a program

1. how to you xpath for dynamic elements?
- identify the pattern and modify xpath pattern
2. Is regular expression helps to identify dynamic elements?
- Not very compatible
3. How to check if any check box is checked or not?
- driver.findElement(By.id(<>).isSelected()
4. What is getWindowHandle method?
- Method will help to handle of opened windows other than parent
5. How to handle alert using selenium?
- Driver.swithcho.alert()
6. What is Iterator?
all
- Iterator enables you to cycle through a collection, obtaining or re...
- It basically starts at the beginning of a collection
- When you want to know which things are in a certain collection, you...
7. After the poup actions, how to switch the driver back to the parent window?
- browser.switchTo().window(parentWindowHandle);
8. A constructor
- is used to create objects
9. Which declaration of the main method below would allow a class to be started as a standalone program. Select the one correct answer
- public static void main(String args[])
10. Native methods can be 'abstrct'
- false

V.Selenium Webdriver

1. in webdriver, which method closes the open browser?
- close()
2. In web driver, which of the following is a valid select statement that selects a value from a drop down element?
all
- selectByIndex()
- selectByVisibleText()
- selectByValue()
3. Which webdriver method is used to change focus to an alert, a frame or a browser window?
- switchTo()
4. In Webdriver, which methods navigates a URL?
- get(\url\")"
5. In  webdriver, which command takes ou forward by one page on the browser history?
- navigate().forward()
6. In webdriver, which command can be used to enter values onto text boxes?
- sendKeys(\text\")"
7. In webdriver, which is the method that counts the number of elements?
- driver.findElements(By.id(\search\")).size()"
8. In webdriver, which of the following commands retrieves the text of a html element?
- getText()
9. What funtionality does Webdriver support on browser cookies?
any
- add and delete an individual cookie
- delete all cookies
10. Which of these Webdriver interface methods is used to open a URL in the browser?
any
- Get
- navigate().to

VI. Junit

VII. TestNG

Wednesday, April 12, 2017

Testcase for Authentication module

I. Login Form



ID
Title
Steps
Expected Result
TC_01
Check login form component with layout same as design
Open Login form
The login form is display with specific components have layout is same as design
TC_02
Check default focus is set to Username field and tab index order is working with tab key from keyboard
1. Open login form
2. Press Tab key (from keyboard) for 4 times
The default focus is set to Username field. It will be change by following order by tab key pressed
Username -> Password -> Remember me -> Login button
TC_03
Check the password field is displayed by secret character or not?
1. Open login form
2. Input any text to password field
The password field content is display as secret key
TC_04
Check Sign in button is triggered by press Enter key from keyboard
1. Open login form
2. Input valid text for Username and password
3. Press Enter key
The sign in button is triggered for processing
TC_04
Verify login function working with empty username and empty password values
1. Open login form
2. Set username and password is empty
3. Click Sign in button or press Enter key
The message text "You have to input Username and Password for login"
TC_05
Verify login function working with valid username and empty value for password
1. Open login form
2. Input valid value for username field
3. Set password field is empty
4. Click Sign in button or press Enter key
The message text "You have to input Password for login"
TC_06
Verify login function working with invalid username value and password is valid value
1. Open login form
2. Input invalid value for username (contain space or special character)
3. Input valid value for password
4. Click Sign in button or press Enter key
The message text "Your username is invalid. Please check and try again" is showed
TC_07
Verify login function working with valid Username value (existed in database) and invalid password (not belong to Username)
1. Open login form
2. Input valid username (the username is existed on database)
3. Input any text for password field (not belong to inputted username)
4. Click sign in button or press enter key
The message text "Your password is not right. Please check and try again" is showed
TC_08
Verify login function working with valid username and valid password (both username and password are existed on database)
1. Open login form
2. Input valid username (the username is existed on database)
3. Input valid password value which belong to inputted username
4. Click sign in button or press enter key
The login is successfully. The homepage is displayed
TC_09
Verify login function working with valid username and valid password (both username and password are existed on database) and remember checkbox is checked
1. Open login form
2. Input valid username (the username is existed on database)
3. Input valid password value which belong to inputted username
4. Set remember checkbox are checked
5. Click sign in button or press enter key
6. Restart browser and reopen homepage site
The login is remain working. The homepage is displayed
TC_10
Verify login function working with special character for username and valid value for password
1. Open login form
2. input special character for username field
3. Input valid value for Password
4. Click Sign in button or press Enter
The message "Your username is invalid" is display and login is not works continue
TC_11
Verify login function working with JavaScript code for Username or Password
1. Open login form
2. Input java script code for username or password field
3. Click sign in button or press Enter
The message "Your username or password is invalid" is display and login is not works continue
TC_12
Verify login function working with T- SQL command for Username or Password
1. Open login form
2. Input T- SQL command for username or password field
3. Click sign in button or press Enter
The message "Your username or password is invalid" is display and login is not works continue



 

II. Register Form



ID
Title
Steps
Expected Result
R_01
Check register layout form is same as design version
Open register form
The register form is display with layout is same as design
R_02
Check default focus and tab order index is working on register form or not?
1. Open register form
2. Press tab index for 5 times
Default focus is set to first control on form loaded time.
When tab key pressed, the focus will be changed by following order
Name -> Email ->Password ->Confirm password -> Register
R_03
Check Register button is triggered by enter key pressed
1. Open register form
2. Press enter key on the keyboard
The Register button is triggered for form validate working
R_04
Check password and confirm password is display by secret character
1. Open register form
2. Input any text on password and confirm password field
The content is display as secret key automatically instead original content
R_05
Verify register form working with empty string on every fields
1. Open register form
2. Set every fields to empty
3. Click on Register button or press Enter key
The message "Please fill out all informations " is showed
R_06
Verify register form working in case missing value for Name field and valid value for other fields
1. Open register form
2. Set empty string for Name field
3. Input valid value for other fields
4. Click
Register button or press Enter key
The message "Please enter your name" is display. And focus will be set to Name field after message is closed
R_07
Verify register form working in case missing value for Email field and valid value for other fields
1. Open register form
2. Set empty string for Email field
3. Input valid value for other fields
4. Click
Register button or press Enter key
The message "Please enter your Email" is display. And focus will be set to Email field after message is closed
R_08
Verify register form working in case the invalid value for Email field and valid value for other fields
1. Open register form
2. Set malformed email for Email field
3. Input valid value for other fields
4. Click
Register button or press Enter key 
The message "Please enter your valid email" is displayed and focus will be set to email field after message is closed
R_09
Verify register form working in case missing value for password field
1. Open register form
2. Set empty string for password field
3. Input valid value for other fields
4. Click
Register button or press Enter key
The message "Please input your password" is showed and the focus will be set to Password field after message is closed
R_10
Verify register form working in case the confirm password value and password value are not match
1. Open register form
2. Input valid value for Name, Email, Password fields
3. Input confirm password is different with password value
4. Click
Register or press Enter key
The message "Your confirm password is not match" is showed. The confirm password field take the focus after message is closed
R_11
Verify register form working in case every fields take valid data, confirm password and password value are matching
1. Open register form
2. Input valid data on every fields.
3 Press enter key or click on
Register button
New account is created.
R_12
Verify register form working in case every fields take valid data, confirm password and password value are matching but Email is used by other account
1. Open register form
2. Input valid data on every fields. The email field is take value from other account
3 Press enter key or click on
Register button
The message "Your email is in used by another account" and focus will be set to email field after message closed
R_13
Verify register form working with some special character or HTML code or T- SQL command inputted on Name field
1. Open register form
2. Input some value (Special character or HTML Code or T- SQL command) for Name field
3. Click
Register or press Enter key
The system should be not worked on this data