wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

How to test

Total questions: 38

Worksheet time: 13mins

Name
Class
Date
1.
How do you do test cases in Java?
a)
a) Right-click and select "Run As > JUnit Test."
b)
b) Use the @Test annotation in JUnit.
c)
c) Write test cases after the code.
d)
d) Use a tool like JUnit for testing.
2.
How do you write a good Java test?
a)
a) Follow best practices and write tests before the code.
b)
b) Determine test code coverage and use external dependencies.
c)
c) Test implementation details and avoid test automation.
d)
d) Use JUnit as the primary testing framework.
3.
What does test() do in Java?
a)
a) Runs a method before each test.
b)
b) Runs a method after each test.
c)
c) Marks a method as a test method.
d)
d) Executes JUnit assertions.
4.
What is the tool to test Java code?
a)
a) JUnit
b)
b) TestNG
c)
c) Mockito
d)
d) Selenium
5.
How unit testing is done in Java?
a)
a) Write test cases in the same package as the source code.
b)
b) Compare expected and actual results for each test case.
c)
c) Prefer complex test cases over simple ones.
d)
d) Use JUnit annotations for test setup and teardown.
6.
How to write test cases for Java API?
a)
a) Use the describe function and pass data between steps.
b)
b) Validate the endpoint response using assert methods.
c)
c) Use the @Test annotation and JUnit framework.
d)
d) Use tools like Postman for API testing.
7.
What should I learn in Java for testing?
a)
a) Parameterized testing and JUnit testing.
b)
b) Enterprise software and dynamic testing.
c)
c) Test class lifecycle and managing resources.
d)
d) All of the above.
8.
What is positive testing in Java?
a)
a) Testing for expected behaviors.
b)
b) Testing with negative inputs.
c)
c) Testing for error handling.
d)
d) Testing with performance benchmarks.
9.
Why Java for testers?
a)
a) Ability to build web applications and automation frameworks.
b)
b) Strong community support and popularity for GUI automation.
c)
c) Better career prospects compared to other languages.
d)
d) Comprehensive debugging and profiling tools.
10.
What is a test plan in Java?
a)
a) A document outlining software testing areas and activities.
b)
b) A detailed schedule for executing test cases.
c)
c) A collection of test scripts for automated testing.
d)
d) A framework for writing and executing unit tests.
11.
Where can I test JavaScript?
a)
a) Using browser developer tools.
b)
b) Using a specialized JavaScript testing tool.
c)
c) Through an integrated development environment (IDE).
d)
d) By running JavaScript code in the command line.
12.
What is testing technique?
a)
a) Evaluating system requirements using test cases.
b)
b) Implementing automated testing tools.
c)
c) Applying software testing methodologies.
d)
d) Utilizing code analysis for bug detection.
13.
How to create a tester in Java?
a)
a) Right-click and select "Create Tester."
b)
b) Use a code snippet for tester creation.
c)
c) Generate a tester through an IDE.
d)
d) Manually write tester code in Java.
14.
How to write a tester class in Java?
a)
a) Manually create a tester class using a text editor.
b)
b) Use an IDE's built-in template for tester classes.
c)
c) Copy and modify an existing tester class.
d)
d) Convert a regular Java class into a tester class.
15.
What is a JUnit test?
a)
a) A comprehensive test suite for Java applications.
b)
b) An automated test case written in JUnit.
c)
c) A testing technique for evaluating Java code quality.
d)
d) A test execution framework for Java projects.
16.
What is the step of unit testing?
a)
a) Arrange, Act, Assert (AAA) phases.
b)
b) Pre-testing, testing, post-testing phases.
c)
c) Plan, execute, report phases.
d)
d) Setup, execute, validate phases.
17.
How do I test REST calls?
a)
a) Use command-line tools for REST testing.
b)
b) Develop a custom REST testing framework.
c)
c) Utilize specialized API testing libraries.
d)
d) Employ tools like Advanced REST Client.
18.
What is API testing in Java?
a)
a) Testing the user interface of Java applications.
b)
b) Evaluating the performance of Java programs.
c)
c) Validating the functionality of Java libraries.
d)
d) Verifying the behavior of Java APIs.
19.
What is Java Spring Boot?
a)
a) A testing framework for Java applications.
b)
b) A code editor specifically for Java development.
c)
c) A web framework for Java-based microservices.
d)
d) A tool for automating Java code deployment.
20.
What is Java Selenium used for?
a)
a) Automate web browsers and write test scripts.
b)
b) Create functional prototypes and test applications.
c)
c) Perform unit tests, integration tests, and acceptance tests.
d)
d) Develop and test solutions using various programming languages.
21.
Is Java useful in software testing?
a)
a) Essential for IT careers.
b)
b) Enables test automation frameworks.
c)
c) Conducts early testing and avoids absence-of-errors fallacy.
d)
d) Performs end-to-end testing from the end user's perspective.
22.
How to use the test method in Java?
a)
a) Use annotations and execute tests with Test Runner.
b)
b) Select project and click "Test" from the menu.
c)
c) Design exams aligned with course objectives.
d)
d) Create test case class for testing exceptions.
23.
What is end to end testing?
a)
a) Testing the entire Java codebase.
b)
b) Testing user interactions and data flow across applications.
c)
c) Ensuring compatibility with different web browsers.
d)
d) Simulating real-world scenarios for mobile applications.
24.
How to test an exception in Java?
a)
a) Create a class for testing exceptions.
b)
b) Use the "Test Runner" class to execute exception tests.
c)
c) Follow steps: Create class, test case, and test runner.
d)
d) Test exceptions using Java's built-in exception handling.
25.
What is the difference between Java developer and tester?
a)
a) Developers focus on programming, while testers identify potential issues.
b)
b) Testers create prototypes, while developers push applications to their limits.
c)
c) Developers only write code, while testers conduct end-to-end testing.
d)
d) Testers handle programming, while developers focus on testing.
26.
What are the 7 principles of testing?
a)
a) Testing shows defects, exhaustive testing is impossible, early testing, defect clustering, pesticide paradox, testing is context dependent, and absence-of-errors fallacy.
b)
b) Testing is easy, defects can be eliminated completely, testing is not required early, and defects do not cluster.
c)
c) Testing is not necessary, exhaustive testing guarantees error-free software, and defects are independent of context.
d)
d) Testing is optional, defects are predictable, and exhaustive testing is possible.
27.
How to create a test?
a)
a) Select "Create Plan" in Jira's Test Plans section.
b)
b) Align the exam with course objectives and write clear instructions.
c)
c) Choose item types, preview the exam, and word questions clearly.
d)
d) Enlist colleagues or teaching assistants to read through the test.
28.
What are test plans in Jira?
a)
a) Documents to ensure the continued functionality of existing features.
b)
b) Tools for automating web browsers and writing test scripts.
c)
c) Documents used for creating software testing frameworks.
d)
d) Reports generated after running test cases in Jira.
29.
Which tool is better in testing?
a)
a) JUnit
b)
b) Selenium
c)
c) Eggplant
d)
d) Java
30.
Is testing an easy job?
a)
a) Yes, testing is an easy job.
b)
b) No, testing requires creativity and running programs on different platforms.
c)
c) No, testing is not required for software development.
d)
d) Yes, testing is solely focused on identifying glitches.
31.
What is the salary of a QA tester in India?
a)
a) ₹ 1.6 Lakhs to ₹ 7.2 Lakhs
b)
b) ₹ 7.2 Lakhs to ₹ 10 Lakhs
c)
c) ₹ 10 Lakhs to ₹ 15 Lakhs
d)
d) ₹ 15 Lakhs to ₹ 20 Lakhs
32.
How can I practice JavaScript?
a)
a) Join the coding community and write coding articles.
b)
b) Build projects, complete code challenges, and share your learning journey.
c)
c) Improve existing projects and join open-source projects.
d)
d) Enroll in a JavaScript programming course.
33.
What is JUnit in Java?
a)
a) An open-source tool for automating web browsers.
b)
b) A popular unit testing framework used in Java.
c)
c) A tool for creating test plans in Jira.
d)
d) A Java programming course for testers.
34.
How can I run JavaScript?
a)
a) Use Java's built-in JavaScript runner.
b)
b) Run JavaScript in a browser's developer tools console.
c)
c) Execute JavaScript using Jira's scripting capabilities.
d)
d) Write JavaScript code directly in the command line.
35.
What are the 5 testing methods?
a)
a) Unit tests, integration tests, functional tests, regression tests, and acceptance tests.
b)
b) Load tests, security tests, usability tests, performance tests, and stress tests.
c)
c) Manual tests, automated tests, ad hoc tests, exploratory tests, and user acceptance tests.
d)
d) Smoke tests, sanity tests, retesting, regression tests, and acceptance tests.
36.
What are the 3 types of test data?
a)
a) Normal data, boundary data, and erroneous data.
b)
b) Positive data, negative data, and neutral data.
c)
c) Static data, dynamic data, and random data.
d)
d) Test data, reference data, and validation data.
37.
What are the four basic testing methods?
a)
a) Unit/component testing, integration testing, system testing, and acceptance testing.
b)
b) Alpha testing, beta testing, gamma testing, and delta testing.
c)
c) Black-box testing, white-box testing, grey-box testing, and ad hoc testing.
d)
d) Load testing, stress testing, performance testing, and security testing.
38.
How to test a batch job in Java?
a)
a) Set up the database, clear and insert records, and launch the job.
b)
b) Use JUnit's batch testing module to automate the process.
c)
c) Manually execute the batch job and analyze the results.
d)
d) Use Java's built-in batch testing framework for automated testing.