API Testing

API Testing Test 1

0%

Which variable is provided by default for environment variables in Jenkins Pipeline?

Correct! Wrong!

Explanation:
Environment variables are exposed by Jenkins Pipeline via the global variable env, which may be accessed from anywhere in a Jenkinsfile.

For the json-schema-validator module, which library does REST Assured use?

Correct! Wrong!

Explanation:
The json-schema-validator module in REST Assured performs validation using Francis Galiegue's json-schema-validator (fge) library.

Which Postman variables are available across all requests in a collection and are not affected by environment?

Correct! Wrong!

Explanation:
Variables at the collection scope are defined using collection variables. During the execution of a collection or request within the supplied collection, collection variables do not change. Essentially, throughout request execution, collection variables could be retrieved but not modified.

Which Postman console offers diagnostic data during development?

Correct! Wrong!

Explanation:
DevTools are a suite of web development tools that appear in the browser next to a rendered webpage. DevTools is a sophisticated tool for inspecting and debugging web pages and apps. Within the DevTools environment, you may also modify source files and create website projects.

Which data provider function in PHPUnit allows a test method to accept any number of arguments?

Correct! Wrong!

Correct answer:
additionProvider

What is the REST guaranteed default port?

Correct! Wrong!

Explanation:
RestAssured.port=8080; Normally, the base URL will have the domain as the value, but we'll be utilizing various URLs as our API endpoints more often, so we may use the RestAssured.basePath variable to hold the path.

Which activities should not be included in end-to-end testing design as build conditions?

Correct! Wrong!

Explanation:
End-to-end testing is a type of software testing that evaluates the entire software from beginning to end, including its integration with external interfaces. End-to-end testing simulates a full production environment by looking for dependencies, data integrity, and interaction with other systems, interfaces, and datasets throughout the software.

What is Pytest's mechanism for executing code before each test method?

Correct! Wrong!

Explanation:
Fixtures in Pytest are functions that run before each test function to which they are applied. Fixtures are used to supply data into the tests, such as database connections, test URLs, and input data. As a result, rather than repeating the same code for each test, we can attach a fixture function to the tests, which will run and return data to the test before each test is executed.

Which Postman variables enable data access across collections, requests, test scripts, and environments?

Correct! Wrong!

Explanation:
Global variables are all-purpose variables that should be avoided and only used for rapid prototyping needs. These variables are available to any Postman console queries, regardless of which collection they belong to.