wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

PROG4 Part 1

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

What is the main objective of testing in the software development lifecycle?

a)

To write code efficiently

b)

To ensure the software runs on all operating systems

c)

To reduce the cost of development

d)

To ensure bug-free software that meets customer requirements

2.

Why is testing considered strenuous?

a)

It requires manual execution of test cases to detect bugs and errors

b)

It requires setting up many servers

c)

It involves compiling code repeatedly

d)

 It requires internet access

3.

Selenium is primarily used for testing:

a)

Desktop applications

b)

Web applications

c)

Mobile applications

d)

Game software

4.

Which of the following browsers is NOT mentioned as supported by Selenium?

a)

Firefox

b)

Chrome

c)

Opera

d)

Brave

5.

Which languages can be used to write Selenium tests?

a)

C++, C#, Python

b)

Java, Python, Perl, PHP, Ruby

c)

Pascal, JavaScript, HTML

d)

Kotlin, Swift, Bash

6.

Why is Selenium considered platform-independent?

a)

It doesn’t require installation

b)

It works only with Windows

c)

It uses only Python

d)

It can be deployed on Windows, Linux, and Macintosh

7.

Selenium can be integrated with which of the following tools for test management?

a)

GitHub

b)

Docker

c)

 JUnit and TestNG

d)

Jenkins and Travis

8.

What is Selenium IDE primarily used for?

a)

Writing Java programs

b)

Recording user interactions

c)

Installing plugins

d)

Managing databases

9.

What is the output format of test scripts generated by Selenium IDE?

a)

C#, Java, Python, Ruby, and Selenese

b)

Binary format

c)

Only Java

d)

Only XML

10.

Selenium RC communicates with browsers using:

a)

JavaScript-based proxy

b)

Native browser drivers

c)

Webhooks

d)

REST APIs

11.

Selenium WebDriver was developed to overcome the limitations of:

a)

Selenium IDE

b)

Selenium RC

c)

Selenium Grid

d)

JUnit

12.

Which is a major limitation of Selenium RC?

a)

It only works on Linux

b)

It cannot test websites

c)

It uses a JavaScript-based proxy, affecting performance

d)

 It does not support any programming language

13.

What is the main advantage of Selenium Grid?

a)

It enables parallel testing on multiple machines

b)

It supports only one browser at a time

c)

It increases test accuracy

d)

It reduces the need for programming

14.

Which of the following is NOT an advantage of Selenium testing?

a)

Multi-language support

b)

Strong image testing capabilities

c)

Accurate and reliable results

d)

Free and open-source

15.

A key limitation of Selenium is:

a)

It requires expensive licenses

b)

 It only supports Java

c)

It cannot test mobile or desktop applications

d)

It cannot run on Windows

16.

How does Selenium help with Continuous Integration/Deployment (CI/CD)?

a)

 It sends alerts to developers manually

b)

It doesn't support CI/CD

c)

It blocks code from deployment

d)

It integrates into CI/CD pipelines to automate testing

17.

Selenium scripts are considered reusable because:

a)

They are stored on cloud automatically

b)

They can be modified only by Selenium engineers

c)

They can be used across different test cases and projects

d)

 They are encrypted

18.

What scripting language is unique to Selenium IDE?

a)

Java

b)

Selenese

c)

Ruby

d)

Python

19.

Which of the following is a reason why Selenium is widely adopted?

a)

 It is developed in JavaScript and easy to use

b)

 It tests only Java-based apps

c)

It has strong commercial support

d)

 It does not need programming knowledge at all

20.

What protocol does Selenium WebDriver use to communicate with web browsers? 

a)

HTTP

b)

FTP

c)

XML

d)

JSON

21.

What does ORM stand for?

a)

Object-Related Memory

b)

Object-Relational Mapping

c)

Operational Relational Method

d)

Object Runtime Manager

22.

What is the primary purpose of an ORM?

a)

To manage network requests

b)

To optimize frontend performance

c)

To control access permissions

d)

To transmit data between a relational database and the application model

23.

What does ORM help developers avoid writing manually?

a)

SQL

b)

HTML

c)

JavaScript

d)

CSS

24.

What is a QuerySet in ORM context?

a)

A list of tables

b)

A SQL statement

c)

A list of objects of a model

d)

A method to connect databases

25.

In a one-to-one relationship, how do the records relate?

a)

One record in table1 relates to many in table2

b)

 Each row in table1 corresponds to a single row in table2

c)

Every row relates to itself

d)

Table2 has no connection with table1

26.

What is true about a one-to-many relationship?

a)

Table2 objects relate to multiple objects in table1

b)

Table1 objects relate to only one in table2

c)

One object from table1 can relate to multiple in table2

d)

The relationship is always circular

27.

In a many-to-many relationship:

a)

There is no relationship between tables

b)

One table can only connect with one other

c)

Every row must have a unique ID

d)

Multiple objects from both tables can relate to each other

28.

Which ORM strategy involves a class representing each database table and instances mapping to rows?

a)

Active Record

b)

Data Mapper

c)

 Identity Map

d)

Unit of Work

29.

What does the Data Mapper pattern do?

a)

Separates the domain model from the database layer

b)

Deletes unused database entries

c)

Combines all objects into one table

d)

Disables schema changes

30.

Which pattern ensures that only one instance represents each object in the application?

a)

Unit of Work

b)

Active Record

c)

 Identity Map

d)

Table Gateway

31.

What is the Table Gateway pattern responsible for?

a)

Encrypting data at rest

b)

Handling database access for a specific table

c)

Connecting multiple databases

d)

Managing front-end behavior

32.

What is the function of the Unit of Work pattern?

a)

Logging user activity

b)

Mapping front-end UI components

c)

Compressing large data sets

d)

Managing and coordinating database transactions

33.

Which is the first step in using an ORM?

a)

Create a database

b)

Run a SQL command

c)

Define the mapping between objects and tables

d)

Delete all data

34.

Which CRUD operation involves fetching data from a database?

a)

Update

b)

Create

c)

Delete

d)

Retrieve

35.

What ORM operation allows you to modify existing records in the database?

a)

Update

b)

Read

c)

Write

d)

Delete

36.

How does ORM support database schema changes?

a)

By dropping all tables

b)

By handling schema changes automatically or through migration tools

c)

By manually rewriting SQL code

d)

It doesn’t support schema changes

37.

One key benefit of using ORM is:

a)

Requires complex SQL queries

b)

Reduces security

c)

Improves developer productivity

d)

Slows down testing

38.

Which of the following is NOT a benefit of ORM?

a)

 Requires writing raw SQL

b)

Enhances security

c)

Simplifies maintenance

d)

Promotes code reusability

39.

ORM provides database independence, meaning:

a)

 It only supports one type of database

b)

 The database must be created manually

c)

It requires separate code for each database

d)

The application logic doesn't need to change when switching databases

40.

This command will create a new migration file in the myapp/migrations directory that contains the necessary SQL statements to modify the database.

a)

migrations

b)

makemigrations

c)

modifymigrations

d)

createmigrations

41.

What is the primary purpose of isolation testing?

a)

To isolate and test individual components independently

b)

To test the entire application workflow

c)

To test UI responsiveness

d)

To write integration scripts

42.

According to Kent Beck, what is the best way to find bugs?

a)

By reviewing logs

b)

By isolating them

c)

By performing stress testing

d)

By integrating components first

43.

What is a key benefit of isolation testing?

a)

 Increases development time

b)

Makes applications slower

c)

Helps identify and fix defects early

d)

Replaces unit testing

44.

Which of the following is a characteristic of isolation testing?

a)

It is performed after release

b)

It requires no simulation

c)

It is atomic in nature

d)

It skips edge case scenarios

45.

Why can isolation testing be expensive?

a)

It requires more RAM

b)

 It needs a live database

c)

It requires paid frameworks

d)

It involves creating stubs and drivers

46.

What is the role of a stub in isolation testing?

a)

To provide expected inputs to a component

b)

To collect test output

c)

To delete test data

d)

To perform integration

47.

 Drivers in isolation testing are used to:

a)

Replace entire modules

b)

Collect output from the unit under test

c)

Store test cases

d)

Simulate UI behavior

48.

 In isolation testing, mock objects are often used to:

a)

Format output

b)

Generate random input

c)

Simulate the behavior of external dependencies

d)

Replace the code being tested

49.

What makes isolation testing time-consuming?

a)

It runs only after deployment

b)

It requires user input

c)

It uses third-party APIs

d)

 Each component must be tested individually

50.

Which of the following is NOT an advantage of isolation testing?

a)

 Improved quality

b)

Early bug detection

c)

Reduced debugging time

d)

Real-time system performance monitoring