Malina

A visually appealing illustration of a person taking an online quiz about software testing, surrounded by Java code snippets and icons representing testing frameworks like Selenium and TestNG in a colorful, engaging style.

Testing Mastery Quiz

Welcome to the Testing Mastery Quiz! This quiz consists of 50 carefully crafted questions designed to test your knowledge of Java testing frameworks, libraries, and best practices in automation.

Whether you're a beginner or an experienced tester, this quiz will help you:

  • Enhance your understanding of Selenide and Selenium
  • Familiarize yourself with TestNG and its annotations
  • Learn about REST-assured capabilities
50 Questions12 MinutesCreated by TestingGuru101
Selenide is a library for Selenium WebDriver.
True
False
Which library/framework doesn't support assertions?
Selenium
Selenide
TestNG
None of above
Which type returns the method that annotated @DataProvider?
2D array
Collection
List
Hashmap
Which of the following annotated methods runs first?
@BeforeTest
@BeforeSuite
@BeforeClass
@BeforeMethod
Which of the following annotations is more applicable for tests at class level?
@Feature
@Epic or @Feature
@Epic
@Step
REST-assured is a java library.
True
False
Which methods of selectors are available in Selenide?
By attribute
By value
By text
All of above
Which of the following best describes serialization?
Representing any structured data into a programming class and vice versa
Representing any structured data into a programming class
Representing programming class into any structured data
None of above
How to log Content-type using Rest Assured Logging?
Only using log().headers()
Using log().headers() or log().all()
Only using log().all()
Using log().headers() or log().body()
Which is the most popular Design Pattern for UI tests?
Page Object Model
Factory
Fluent API
None of above
In BDD syntax after which method user should specify service method specification?
Given()
When()
Then()
None of above
Which of the following patterns is based on method chaining?
Fluent API
Page Factory
Fluent API and Page Factory
Page Object Model
Class contains two method with annotations Test. If we run test class, which annotated method will be executed twice?
@AfterTest
@BeforeMethod
@AfterSuite
@BeforeSuite
Which of the following method of assertion is used to validate whether element is displayed or not?
Assert.assertTrue($("#element").isDisplayed())
Assert.assertEquals($("#element").isDisplayed(),true)
$("#checkboxes input").shouldBe(Condition.appear)
All of above
How to achieve test sequence in TestNG?
Using priority parameter
Using include in methods tag in testng.xml
Using alphabetical order in test class
All of above
Which of the following methods returns ElementsCollection?
First()
filterBy(Condition condition)
FindBy(Condition condition)
All of above
Which of the following web elements can be validated with shouldBe(enabled) assertion?
Inputs
Dropdown options
Checkboxes
All of above
Which of the following information is displayed by default in Allure report?
Duration
Description
Links
None of above
Which of the following test result statuses is available in Allure?
Broken
Passed
Unknown
All of above
Which of the following best describes deserialization?
Representing any structured data into a programming class and vice versa
Representing any structured data into a programming class
Representing programming class into any structured data
None of above
Which of the following methods of assertions is valid?
ShouldBe(and("Check",visible,hidden,appear))
ShouldBe(or("Check",visible,hidden,appear))
ShouldBe(or("Check",visible,hidden))
All of above
Which of the following options set disabled test method in TestNG?
Enabled=true
Enabled=false
None of above
Which of the following methods of assertions is available in Selenide?
Equals()
ShouldNot()
AssertEquals()
None of above
Which of the following operations type is available for Selenide selectors?
Multiple selectors chaining
Using Parent/closest
Using and/or operation
All of above
Which of the following expressions is NOT a valid JSON path?
Body("records.id[1,2]",hasItems(id1, id2))
with(Object).get("store.book[-1].category")
With(Object).get("store.book[0].category")
None of above
Which of the following methods can be used with input elements?
ShouldBe()
SendKeys()
SetValue()
All of above
Which of the following expressions is used for deserialization of response body?
Body(Object reference)
Body.as(JavaClassName.class)
Body.as(JSONobject)
None of above
Which of the following operations type is available for Selenide collections?
Closest()
Get(int index)
Get(text(String text))
All of above
Which of the following operations with Rest services can be performed using Rest Assured?
verify status message
Verify response headers
verify response body
All of above
Which of the following operations can be used with dropdown elements?
select option with exact text
Select option by index
Get selected option
All of above
How new jar files can be added in a java project from Intellij idea?
Project Structure > Project Settings > Modules > Dependencies
Setting > Dependencies
None of the above
In BDD syntax after which method user should put test assertions?
Given()
When()
Then()
None of above
Which of the following expressions is used for uncheck checkbox?
ShouldBe(unchecked)
ContextClick()
SetSelected(false)
None of above
Which of the following functionalities is available in TestNG?
Run test in parallel
Parametrization
HTML reports
All of above
Which browser supports Selenide API?
Chrome
Edge
Safari
All of above
Which of the following values of @Severity annotation is not available in Allure?
Major
Trivial
Normal
Minor
Which is the default value of priority parameter?
Null
0
1
None of above
How to find web element by Id using Selenide?
$("#webElement")
$("webElement")
$(".webElement")
All of above
In expression DataProvider(name = "data-provider") 'name' indicates
Method parameter name
Method name
Class name
Project name
TestNG is a testing framework for java inspired by NUnit.
True
False
Which of the following TestNG methods is used for parametrization?
@DataProvider
@Factory
@Parameters
All of above
Which of the following annotations is not available in Allure?
@Step
@Feature
@Test
@Epic
Which statement is wrong related to Selenide features?
Automatic driver closing
Find element containing given text
Soft assertions
None of above
Which of the following annotations is more applicable for step objects?
@Severity
@Step
@Epic
@Feature
Which of the following options is available from testng file related to parallel execution?
Run methods in parallel
Run classes in parallel
Run test in parallel
All of above
Which of the following expressions is a valid collection assertion?
shouldHave(text("automation"))
ShouldHave(type("checkbox"))
ShouldHave(size(5))
All of above
Which of the following is hierarchically the highest?
@Epic
@Test
@Feature
@Story
What is the main purpose of Page Object Model?
Keep tests and element locators separately
Keep all pages of web application in one single class
Keep tests and test data separately
Which parameter is used with dependsOnMethods in order to skip test if the method, on which it depended fails?
By default it fails, additional parameter is not required
AlwaysRun=true
Enabled=true
AlwaysRun=false is required for skip dependent method
Which of the following methods of chainable selectors is valid?
$(".container").$(".topContainer")
$(".container").$(".topContainer").$(byTitle("title"))
$(".container").$(".topContainer").$(byTitle("title")).$(byValue("value"))
All of above
{"name":"Malina", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Welcome to the Testing Mastery Quiz! This quiz consists of 50 carefully crafted questions designed to test your knowledge of Java testing frameworks, libraries, and best practices in automation. Whether you're a beginner or an experienced tester, this quiz will help you: Enhance your understanding of Selenide and SeleniumFamiliarize yourself with TestNG and its annotationsLearn about REST-assured capabilities","img":"https:/images/course3.png"}
Powered by: Quiz Maker