Sunday, April 19, 2015

ISTQB/ ISEB Questions and answers

ISTQB/ISEB Foundation Level Questions and answers 

1. Deliverables of test design phase include all the following except (Testing
artifacts)
a) Test data
b) Test data plan
c) Test procedure plan
d) Test summary report 
--------------------------------------------------------------------------------------------------------------------------
2. Which of the following is not decided in the test-planning phase? (Testing
artifacts)
a) Schedules and deliverables
b) Hardware and software
c) Types of test cases 
d) Entry and exit criteria
------------------------------------------------------------------------------------------------------------------------- 
3. Typical defects that are easier to find in reviews than in dynamic testing are:
A. deviations from standards,
B.requirement defects,
C.design defects,
D.insufficient maintainability and incorrect interface specifications.
E.All of the above.
--------------------------------------------------------------------------------------------------------------------------
4. Load Testing Tools (Per. Testing)
a) reduces the time spent by the testers
b) reduces the resources spent (hardware)
c) mostly used in web testing
d) all of the above
--------------------------------------------------------------------------------------------------------------------------
5. Reviews, static analysis and dynamic testing have the same objective –
A.identifying defects.
B. fixing defects.
C. 1 and 2
D. None
--------------------------------------------------------------------------------------------------------------------------
6. Defect arrival rate curve:
A. Shows the number of newly discovered defects per unit time
B. Shows the number of open defects per unit time.
C. Shows the cumulative total number of defects found up to this time.
D. Any of these, depending on the company.
--------------------------------------------------------------------------------------------------------------------------
7. What are the 2 major components taken into consideration with risk analysis?
(Test Mgmt)
a) The probability the negative event will occur
b) The potential loss or impact associated with the event
c) Both a and b
d) Neither a nor b
--------------------------------------------------------------------------------------------------------------------------
8. We can achieve complete statement coverage but still miss bugs because:
A. The failure occurs only if you reach a statement taking the TRUE branch of an IF
statement, and you got to the statement with a test that passed through the FALSE
branch.
B. The failure depends on the program's inability to handle specific data values,
rather than on the program's flow of control.
C. Both A and B
D. We are not required to test code that customers are unlikely to execute.
--------------------------------------------------------------------------------------------------------------------------
9. Who is responsible for conducting test readiness review? (Performing
Test)
a. Test manager
b. Test engineer
c. both A & B
d. Project Manager
--------------------------------------------------------------------------------------------------------------------------
10. What if the project isn't big enough to justify extensive testing? (Test Mgmt)
a) Use risk based analysis to find out which areas need to be tested
b) Use automation tool for testing
c) a and b
d) None of the above
--------------------------------------------------------------------------------------------------------------------------
11. What are the key features to be concentrated upon when doing a testing for
world wide web sites (Test Execution)
a) Interaction between html pages
b) Performance on the client side
c) Security aspects
d) All of the above
--------------------------------------------------------------------------------------------------------------------------
12. What can be done if requirements are changing continuously? (Test Mgmt)
a) Work with the project's stakeholders early on to understand how
requirements might change so that alternate test plans and strategies
can be worked out in advance, if possible.
b) Negotiate to allow only easily-implemented new requirements into the
project, while moving more difficult new requirements into future
versions of the application
c) Both a and b
d) None of the above
--------------------------------------------------------------------------------------------------------------------------
13. The selection of test cases for regression testing (Testing artifacts)
a) Requires knowledge on the bug fixes and how it affect the system
b) Includes the area of frequent defects
c) Includes the area which has undergone many/recent code changes
d) All of the above
--------------------------------------------------------------------------------------------------------------------------
14. Measurement dysfunction is a problem because:
A. Even though the numbers you look at appear better, to achieve these numbers,
people are doing other aspects of their work much less well.
B. We don't know how to
measure a variable (our measurement is dysfunctional) and
so we don't know how to interpret the result.
C. You are measuring the wrong thing and thus reaching the wrong conclusions.
D. All of the above.
--------------------------------------------------------------------------------------------------------------------------
15. What do you mean by “Having to say NO” (test planning process)
a. No, the problem is not with testers
b. No, the software is not ready for production
c. Both a & b
d. none of the above
--------------------------------------------------------------------------------------------------------------------------
16. According to the lecture, there are several risks of managing your project's
schedule
with a statistical reliability model. These include (choose one or more of the
following):
A. Testers spend more energy early in the product trying to find bugs than preparing
to do the rest of the project's work more efficiently
B. Managers might not realize that the testing effort is ineffective, late in the project,
because they expect a low rate of bug finding, so the low rate achieved doesn't
alarm them.
C. It can increase the end-of-project pressure on testers to not find bugs, or to not
report bugs.
D. All of the above
--------------------------------------------------------------------------------------------------------------------------
17. Operations testing is (Performing Test)
a. compliance testing
b. disaster testing
c. verifying compliance to rules
d. functional testing
e. ease of operations
--------------------------------------------------------------------------------------------------------------------------
18. Tools like change Man, Clear case are used as (test planning process)
a. functional automation tools
b. performance testing tools
c. configuration management tools
d. none of the above.
--------------------------------------------------------------------------------------------------------------------------
19. Important consequences of the impossibility of complete testing are (Choose
one or more answers)
A. We can never be certain that the program is bug free.
B. We have no definite stopping point for testing, which makes it easier for some
managers to argue for very little testing.
C. We have no easy answer for what testing tasks should always be required,
because every task takes time that could be spent on other high importance tasks.
D. All of the above.
--------------------------------------------------------------------------------------------------------------------------
20. Which is not in sequence in 11 Step Software Testing process (Tester’s
Role SDLC)
a Assess development plan and status
b Develop the test plan
c Test software design
d Test software requirement
--------------------------------------------------------------------------------------------------------------------------
21. In the MASPAR case study:A. Security failures were the result of untested parts of
code.
B. The development team achieved complete statement and branch coverage but
missed a serious bug in the MASPAR operating system.
C. An error in the code was so obscure that you had to test the function with almost
every input value to find its two special-case failures.
D. All of the above.
--------------------------------------------------------------------------------------------------------------------------
22. Complete statement and branch coverage means:
A. That you have tested every statement in the program.
B. That you have tested every statement and every branch in the program.
C. That you have tested every IF statement in the program.

D. That you have tested every combination of values of IF statements in the program
--------------------------------------------------------------------------------------------------------------------------
23. What if the project isn't big enough to justify extensive testing? (Test Mgmt)
a) Use risk based analysis to find out which areas need to be tested
b) Use automation tool for testing
c) a and b
d) None of the above
--------------------------------------------------------------------------------------------------------------------------
24. Security falls under (Performing Test)
a. compliance testing
b. disaster testing
c. verifying compliance to rules
d. functional testing
e. ease of operations
--------------------------------------------------------------------------------------------------------------------------
25. Which is the best definition of complete testing:
A. You have discovered every bug in the program.
B. You have tested every statement, branch, and combination of branches in the
program. Download more sample papers at – istqbExamCertification.com
Download more sample papers at – istqbExamCertification.com
C. You have completed every test in the test plan.
D. You have reached the scheduled ship date.
--------------------------------------------------------------------------------------------------------------------------
26. What is the concept of introducing a small change to the program and having
the
effects of that change show up in some test? (Testing concepts)
a) Desk checking
b) Debugging a program
c) A mutation error
d) Performance testing
e) Introducing mutations

Saturday, April 18, 2015

How to read data from application and write to excel selenium webdriver

  Subscribe to get Updates Enter your email address:


Delivered by Mindq Software Testing Tutorials

Read data from application and write to excel --- Using selenium Webdriver

By Using JXL.jar we can write the data to excel

Here i am showing sample application to write the data to excel
Download  jxl.jar and selenium-server-standalone-2.39.0.jar and configure in the build path of java project

package smlisuzu;

import java.io.File;
import java.io.IOException;

import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
import jxl.write.biff.RowsExceededException;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class Smile {
public static void main(String args[]) throws IOException,
RowsExceededException, WriteException, InterruptedException {
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://smlisuzu.com/DealerNetwork.aspx");
driver.findElement(By.xpath(".//*[@id='lstDealerCategory_3']")).click();
//Select dropdown = new Select(driver.findElement(By.id("ddlState")));

//List<WebElement> l = dropdown.getOptions();
//int max = l.size();
  int m = 0;
int n = 0;
WritableWorkbook workbook = Workbook.createWorkbook(new File(
"/home/naveen/Videos/smlisuzu.xls"));
WritableSheet sheet = workbook.createSheet("First Sheet", 0);

driver.findElement(By.id("btnSearch")).click();


//System.out.println(states);
Thread.sleep(22334);
Select dropdown = new Select(driver.findElement(By.id("ddlPageing")));
dropdown.selectByIndex(6);
Thread.sleep(22334);
int z=0;

for(int h=3;h<364;h=h+2)
{
if (h==364){
break;
}
String cityname = driver.findElement(By.xpath(".//*[@id='dlDealer']/tbody/tr/td/table/tbody/tr["+h+"]/td[1]")).getText();

Label labelnew = new Label(0,z, cityname);
sheet.addCell(labelnew);
Thread.sleep(23);
System.out.print(cityname+z);

String office = driver.findElement(By.xpath(".//*[@id='dlDealer']/tbody/tr/td/table/tbody/tr["+h+"]/td[2]")).getText();
Label officelabel = new Label(1,z, office);
sheet.addCell(officelabel);
System.out.print(office);
String officeadd = driver.findElement(By.xpath(".//*[@id='dlDealer']/tbody/tr/td/table/tbody/tr["+h+"]/td[3]")).getText();
Label officeaddlabel = new Label(2,z, officeadd);
sheet.addCell(officeaddlabel);
System.out.println(officeadd);
for(int y=1; y<4;y++){
String mobno = driver.findElement(By.xpath(".//*[@id='dlDealer']/tbody/tr/td/table/tbody/tr["+h+"]/td[4]/table/tbody/tr["+y+"]/td[2]")).getText();
Label mobnolable = new Label(y+2,z, mobno);
sheet.addCell(mobnolable);
System.out.println(mobno);
}

z++;

}
workbook.write();
driver.close();
workbook.close();
}
}

Thursday, February 19, 2015

Pause and break commands in selenium IDE

Enter your email address:


Delivered by Mindq Software Testing Tutorials
Break command in selenium IDE: 


Break command will halt the currently running test case, and wait for the user to press (Pause/resume) or step button to continue the  execution process. It is very useful for debugging the test case, but we should be careful while using this command because it will force automated test cases to hang until a user click on (Pause/resume) or step to continue the test execution

Command Target Value
open https://www.google.co.in/
pause 3000
assertElementPresent id=gbqfq


In the above example  open command will open the google page after that pause command will stop the execution for 3 seconds, after that
break command will get executed and halts the test case execution until user press (Pause/resume) or step button


Pause command: 

pause command will wait for specific time(sleep time) in milliseconds. Test case execution will continue after specified time in "Target" filed


Command Target Value
open https://www.google.co.in/
pause 3000
assertElementPresent id=gbqfq

In the above example first it will open google page after that it will wait for 3000 milliseconds i.e 3 seconds after that assertElementPresent command will get executed.




Related articles: While loop in selenium IDE , Store values in selenium IDE, How to change default timeout in selenium IDE









Monday, February 16, 2015

Selenium IDE commands

Subscribe To get updates

Enter your email address:


Delivered by Mindq Software Testing Tutorials

Selenium IDE commands
addCollection
addCollectionAndWait
addLocationStrategy
addScript
addScriptAndWait
addSelection
addSelectionAndWait
addToCollection
addToCollectionAndWait
allowNativeXpath
allowNativeXpathAndWait
altKeyDown
altKeyDownAndWait
altKeyUp
altKeyUpAndWait
answerOnNextPrompt
assertAlert
Assert commands in selenium IDE
assertAlert
assertAlertNotPresent
assertAlertPresent
assertAllButtons
assertAllFields
assertAllLinks
assertAllWindowIds
assertAllWindowNames
assertAllWindowTitles
assertAttribute
assertAttributeFromAllWindows
assertBodyText
assertChecked
assertConfirmation
assertConfirmationNotPresent
assertConfirmationPresent
assertCookie
assertCookieByName
assertCookieNotPresent
assertCookiePresent
assertCssCount
assertCursorPosition
assertEditable
assertElementHeight
assertElementIndex
assertElementNotPresent
assertElementPositionLeft
assertElementPositionTop
assertElementPresent
assertElementWidth
assertEval
assertExpression
assertFor
assertHtmlSource
assertLocation
assertMouseSpeed
assertNotAlert
assertNotAllButtons
assertNotAllFields
assertNotAllLinks
assertNotAllWindowIds
assertNotAllWindowNames
assertNotAllWindowTitles
assertNotAttribute
assertNotAttributeFromAllWindows
assertNotBodyText
assertNotChecked
assertNotConfirmation
assertNotCookie
assertNotCookieByName
assertNotCssCount
assertNotCursorPosition
assertNotEditable
assertNotElementHeight
assertNotElementIndex
assertNotElementPositionLeft
assertNotElementPositionTop
assertNotElementWidth
assertNotEval
assertNotExpression
assertNotFor
assertNotHtmlSource
assertNotLocation
assertNotMouseSpeed
assertNotOrdered
assertNotPrompt
assertNotSelectOptions
assertNotSelectedId
assertNotSelectedIds
assertNotSelectedIndex
assertNotSelectedIndexes
assertNotSelectedLabel
assertNotSelectedLabels
assertNotSelectedValue
assertNotSelectedValues
assertNotSomethingSelected
assertNotSpeed
assertNotTable
assertNotText
assertNotTitle
assertTitle
assertNotValue
assertNotVisible
assertNotWhetherThisFrameMatchFrameExpression
assertNotWhetherThisWindowMatchWindowExpression
assertNotXpathCount
AssertVisibile
AsertValue
assignIdAndWait
answerOnNextPrompt
assignId
assignIdAndWait
break
captureEntirePageScreenshot
captureEntirePageScreenshotAndWait
check
checkAndWait
chooseCancelOnNextConfirmation
chooseOkOnNextConfirmation
chooseOkOnNextConfirmationAndWait
click
clickAndWait
clickAt
clickAtAndWait
close
contextMenu
contextMenuAndWait
contextMenuAt
contextMenuAtAndWait
controlKeyDown
controlKeyDownAndWait
controlKeyUp
controlKeyUpAndWait
createCookie
createCookieAndWait
createCookieAndWait
deleteAllVisibleCookies
deleteAllVisibleCookiesAndWait
deleteCookie
deleteCookieAndWait
deselectPopUp
deselectPopUpAndWait
doubleClick
doubleClickAndWait
doubleClickAt
doubleClickAtAndWait
dragAndDrop
dragAndDropAndWait
dragAndDropToObject
dragAndDropToObjectAndWait
dragdrop
dragdropAndWait
dragdropAndWait
echo
endFor
endForAndWait
endWhile
endWhileAndWait
fireEvent
fireEventAndWait
focus
focusAndWait
goBack
goBackAndWait
goto
gotoAndWait
gotoIf
gotoIfAndWait
gotolabel
gotolabelAndWait
highlight
highlightAndWait
echo
endFor
endForAndWait
endWhile
endWhileAndWait
fireEvent
fireEventAndWait
focus
focusAndWait
goBack
goBackAndWait
goto
gotoAndWait
gotoIf
gotoIfAndWait
gotolabel
gotolabelAndWait
highlight
highlightAndWait
ignoreAttributesWithoutValue
ignoreAttributesWithoutValueAndWait
keyDown
keyDownAndWait
keyPress
keyPressAndWait
keyUp
keyUpAndWait
label
labelAndWait
metaKeyDown
metaKeyDownAndWait
metaKeyUp
metaKeyUpAndWait
mouseDown
mouseDownAndWait
mouseDownAt
mouseDownAtAndWait
mouseDownRight
mouseDownRightAndWait
mouseDownRightAt
mouseDownRightAtAndWait
mouseMove
mouseMoveAndWait
mouseMoveAt
mouseMoveAtAndWait
mouseOut
mouseOutAndWait
mouseOver
mouseOverAndWait
mouseUp
mouseUpAndWait
mouseUpAt
mouseUpAtAndWait
mouseUpRight
mouseUpRightAndWait
mouseUpRightAt
mouseUpRightAtAndWait
removeScript
removeScriptAndWait
removeSelection
removeSelectionAndWait
rollup
rollupAndWait
runScript
runScriptAndWait
select
selectAndWait
selectFrame
selectPopUp
selectPopUpAndWait
selectWindow
sendKeys
sendKeysAndWait
setBrowserLogLevel
setBrowserLogLevelAndWait






 

Friday, February 13, 2015

How to generate random number in selenium IDE

  Subscribe to get Updates Enter your email address:


Delivered by Mindq Software Testing Tutorials
How to generate random number in selenium ide

To generate random number in selenium we need to use javascript in command like this 

Here iam using store command to store random value 


CommandTargetValue
storejavascript{Math.floor(Math.random()*11)}R
echo${R}


 Random value will get stored in the variable R.

With the help of echo command we can print value of R

Tuesday, February 10, 2015

Commonly used selenium IDE commands

  Subscribe to get Updates Enter your email address:


Delivered by Mindq Software Testing Tutorials


Open:
    This command will opens a page using a URL(uniform resource locator) for example if you want to open google page with the open command you can do like this

command Target Value
open https://www.google.co.in/

Click:This command will click an element which is given in the "Target" filed. To click gmail link we can use click command like this


command Target Value
open https://www.google.co.in/
click link=Gmail

Click And Wait: This command will click an element which is given in the "Target" fields, and also it will wait for page to load



command Target Value
open https://www.google.co.in/
clickandWait link=Gmail

In this example it will wait for gmail page to load after cliking on that link, most of the cases everyone will use this command only because it will run successfully even page take some time to load

Verify Title: This command will verify the title with title given in the Target filed. If the title given in the Target filed and Title present on the page not matched then it will shows test case as failed but execution will continue on the next command.

Assert Title:
This command will verify the title with title given in the Target filed. If the title given in the Target filed and Title present on the page not matched then it will shows test case as failed and execution will be stopped

Verify Text Present: It will verify the given text in the target field is somewhere present on the page or not

Verify Element Present: 

 It will verify the given HTML element in the target field is somewhere present on the page or not

VerifyText:
It will verify text present on particular web element. 




Sunday, February 8, 2015

Test case

  Subscribe to get Updates Enter your email address:


Delivered by Selenium99

Test case : 
Test case defines set of conditions to test the application with respect to requirements. Usually it will be derived from the Test scenario, Test case is the step by step process to cover all possible ways of test scenario. 1 Test scenario may have 1 or more Test cases.

Fields in test case document:

Field Description
Test Case ID Test case id is always unique for future reference, for ex: login_TC_1
Test Scenario ID Test scenario id is also unique for future reference, for ex: login_Sc_1
Test Case Description  Detailed description about the test case
Preconditions What are the steps need to run before executing the current testcase
Test steps All required steps to execute the current test case
Test Data Data required to execute the current test case for ex: To test login functionality we need credentials ex:username is admin, password 12345. Here admin,12345 is the test data for this test case 
Priority Importance of the test case in terms of customer perspective
Expected Result What we are expecting after execution of this test case
Actual Result  what we are getting after execution of test case
Result If Expected result and actual result are same then result pass otherwise fail