How many types of xpath are there?

 In Selenium, there are mainly two types of XPath used for locating elements: 1. Absolute XPath: This XPath starts from the root node and follows the complete path to the element. It is highly specific and is dependent on the structure of the HTML document. Example: /html/body/div[1]/div[2]/div[1]/span 2. Relative XPath: This XPath starts from any element in the HTML document (not necessarily from the root). It is more flexible and commonly used because it is less likely to break if the structure of the page changes slightly. Example: //div[@class='example'] Additionally, XPath can be classified by the type of syntax used for selecting elements: Attribute-based XPath: Selects elements based on their attributes (e.g., id, class, name, etc.). Example: //input[@name='username'] Text-based XPath: Selects elements based on their text content. Example: //button[text()='Submit'] Contains() function: Allows partial matching of attributes or text. Example: //a[contains(@...

Sample Questions for ISTQB (SET-2)

 



Link to ISTQB (SET-1):- click here

Sample  Questions for ISTQB (SET-2)

1. Which statement about the relationship between statement coverage and decision coverage is true?

a) 100% decision coverage also guarantees 100% statement coverage
b) 100% statement coverage also guarantees 100% decision coverage
c) 50% decision coverage also guarantees 50% statement coverage
d) Decision coverage can never reach 100%

2. An employee’s bonus is to be calculated. It cannot be negative, but it can be calculated down to zero. The bonus is based on the length of employment:

• Less than or equal to 2 years

• More than 2 years but less than 5 years

• 5 to 10 years inclusively

• Longer than 10 years

What is the minimum number of test cases required to cover all valid equivalence partitions for calculating the bonus?

a) 3 

b) 5 

c) 2 

d) 4


3.A video application has the following requirement: The application shall allow playing a video on the following display resolution: 

1. 640x480 

2. 1280x720 

3. 1600x1200 

4. 1920x1080 


Which of the following list of test cases is a result of applying the equivalence partitioning test technique to test this requirement? 


a) Verify that the application can play a video on a display of size 1920x1080 (1 test case) 

b) Verify that the application can play a video on a display of size 640x480 and 1920x1080 (2 test cases) 

c) Verify that the application can play a video on each of the display sizes in the requirement (4 test cases)

d) Verify that the application can play a video on any one of the display sizes in the requirement (1 test case)


4.Which of the following statements BEST describes how tasks are divided between the test manager and the tester? 

a) The test manager plans testing activities and chooses the standards to be followed, while the tester chooses the tools and set the tools usage guidelines 

b) The test manager plans, coordinates, and controls the testing activities, while the tester automates the tests 

c) The test manager plans, monitors, and controls the testing activities, while the tester designs tests and decides on the release of the test object 

d) The test manager plans and organizes the testing and specifies the test cases, while the tester executes the tests


5.Which of the following metrics would be MOST useful to monitor during test execution? 


a) Percentage of executed test cases

b) Average number of testers involved in the test execution 

c) Coverage of requirements by source code

d) Percentage of test cases already created and reviewed


6.Which of the following can affect and be part of the (initial) test planning? 


a) Budget limitations 

b) Test log 

c) Failure rate 

d) Use cases


7.Which of the following lists contains only typical exit criteria from testing? 


a) Reliability measures, test coverage, schedule and status about fixing defect and remaining risks 

b) Reliability measures, test coverage, degree of tester’s independence and product completeness 

c) Reliability measures, test coverage, test cost, availability of test environment, time to market and product completeness

d) Time to market, remaining defects, tester qualification, availability of testable use cases, test coverage and test cost


8. Which one of the following is NOT included in a test summary report? 


a) Defining pass/fail criteria and objectives of testing 

b) Deviations from the test approach 

c) Measurements of actual progress against exit criteria 

d) Evaluation of the quality of the test object


9. The project develops a "smart" heating thermostat. The control algorithms of the thermostat were modeled as Matlab/Simulink models and run on the internet connected server. The thermostat uses the specifications of the server to trigger the heating valves. The test manager has defined the following test strategy/approach in the test plan: 

1. The acceptance test for the whole system is executed as an experience-based test. 

2. The control algorithms on the server are checked against standard of the energy saving regulation. 

3. The functional test of the thermostat is performed as risk-based testing. 

4. The security tests of data / communication via the internet are executed together with external security experts. 


What four common types of test strategies/approaches did the test manager implement in the test plan? 

a) Methodical, analytical, reactive, and regression-averse 

b) Analytical, standard-compliant, consultative, and reactive 

c) Model-based, methodical, analytical, and consultative 

d) Regression-averse, consultative, reactive, and methodical


10.Which one of the following is the characteristic of a metrics-based approach for test estimation? 


a) Budget which was used by a previous similar test project 

b) Overall experience collected in interviews with test managers 

c) Estimation of effort for test automation agreed in the test team 

d) Average of calculations collected from business experts


11.You are testing a new version of software for a coffee machine. The machine can prepare different types of coffee based on four categories. i.e., coffee size, sugar, milk, and syrup. The criteria are as follows: 

• Coffee size (small, medium, large) 

• Sugar (none, 1 unit, 2 units, 3 units, 4 units) 

• Milk (yes or no) 

• Coffee flavor syrup (no syrup, caramel, hazelnut, vanilla) Now you are writing a defect report with the following information:

• Title: Low coffee temperature. 

• Short summary: When you select coffee with milk, the time for preparing coffee is too long and the temperature of the beverage is too low (less than 40 °C).

• Expected result: The temperature of coffee should be standard (about 75 °C). 

• Degree of risk: Medium 

• Priority: Normal 


What valuable information was omitted in the above defect report? 

a) The actual test results 

b) Identification of the tested software version 

c) Status of the defect 

d) Ideas for improving the test case


12.Which one of the following is MOST likely to be a benefit of test execution tools? 


a) It is easy to create regression tests

b) It is easy to maintain version control of test assets 

c) It is easy to design tests for security testing 

d) It is easy to run regression tests


13. Which one of the following test tools is mostly suitable for developers rather than testers? 


a) Requirement management tools 

b) Configuration management tools 

c) Static analysis tools 

d) Performance testing tools




Comments

Popular posts from this blog

What is the default package in Java if no package is specified?