Docsity

DevOps – Cert Testing Practice Exam 2026 Guide, Exams of Computer Science

Toggle sidebar
bg1
DevOps – Cert Testing Practice Exam 2026
Guide
1
/
9
1.
What are syntax
errors?
2.
What do we also
need to test for?
3.
What can be test-
ed by running
them once?
4.
What happens if
a program has a
input?
5.
When may
run-time and
specification er-
rors occur?
6.
What are the two
categories usual
run testing tech-
niques can be di-
vided into?
The
simplest
kind
of
error:
when
a
command
is
not
a
legal
command
or
statement
in the programming language.
However,
because
of
the
way
programming
languages
are
parsed,
errors
are
not
always reported at the point they occur.
When
searching
for
syntax
errors,
check
where
the
computer
tells
you
the
problem
is; but if you don't find the error there, track back through the previous lines.
We
also
need
to
test
for:
Run
Time
errors
-
where
the
error
can
only
be
detected
when
the
program
runs.
Specification
errors
-
where
the
program
does
not
crash
or
halt
but
does
not
do
the right thing.
Only
basic
programs
with
no
input
(which
are
really
only
written
when
learning)
can be tested just by running them once.
If
a
program
has
input,
even
for
a
very
simple
program,
it
would
be
impossible
to
test all possible input values.
Run-time
and
specification
errors
may
only
appear
when
certain
values
are
en-
tered, and not all the time.
Usual run testing techniques can be divided into two categories:
Black Box Testing
White
Box
(or
Clear
Box)
Testing
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download DevOps – Cert Testing Practice Exam 2026 Guide and more Exams Computer Science in PDF only on Docsity!

DevOps – Cert Testing Practice Exam 2026

Guide

  1. What are syntax errors?
  2. What do we also need to test for?
  3. What can be test- ed by running them once?
  4. What happens if a program has a input?
  5. When may run-time and specification er- rors occur?
  6. What are the two categories usual run testing tech- niques can be di- vided into?

The simplest kind of error: when a command is not a legal command or statement in the programming language.

However, because of the way programming languages are parsed, errors are not always reported at the point they occur.

When searching for syntax errors, check where the computer tells you the problem is; but if you don't find the error there, track back through the previous lines.

We also need to test for: Run Time errors - where the error can only be detected when the program runs. Specification errors - where the program does not crash or halt but does not do the right thing.

Only basic programs with no input (which are really only written when learning) can be tested just by running them once.

If a program has input, even for a very simple program, it would be impossible to test all possible input values.

Run-time and specification errors may only appear when certain values are en- tered, and not all the time.

Usual run testing techniques can be divided into two categories:

Black Box Testing

White Box (or Clear Box) Testing

DevOps – Cert Testing Practice Exam 2026

Guide

  1. What is black box testing?
  2. What are three testing proce- dures?
  3. What does it mean by create test cases?
  4. What is create test data?
  5. What does it mean by carry out testing and obtain test re- sults?
  6. What do we need to make sure?

Black-box testing treats a program as a 'black box' without considering the actual code.

It focuses on checking if the program's behaviour aligns with algorithm outcomes or requirements specifications. Test cases are developed to cover various scenarios, and specific test data is produced and used for the testing process.

create test cases, create test data, carry out testing and obtain test results

These are human statements of particular circumstances in which the program/al- gorithm will need to run

Must check that all necessary cases are covered

These are particular inputs or situations to run the program in to reproduce the test cases

Must check that they do indeed reproduce the test cases - none are skipped or accidentally made simpler

Run the program test data and note the results

Analyse the results and check they are what is expected; if not, attempt to identify the error

This process can be performed on the algorithm before implementation by work- ing it through by hand - although this is slower it avoids wasting time implementing a doomed algorithm

We need to be sure that we are testing every type of situation the software will face.

  1. What can white box testing be used for?
  2. What are the two steps involved in white box test- ing?
  3. What are some common cover- age criteria that can be used?

It is called white box or clear box as the tester inspects the actual code, unlike in black box testing.

As the tester knows the actual code, the testing can be tailored to ensuring that the lines of code are correct; unlike black box testing which only worries about matching the specification.

Security holes

Broken or poorly structured paths in the code

Correct flow of inputs through the code

Expected output

Correct functionality in conditional loops

Correctness of each statement

§Understand the source code. -Unlike black box testing, knowledge of the code is required to carry out white box testing ettectively.

§Create test cases and execute. -By looking at the code, the tester can determine what needs to be tested and provide tests for it. -Each part of the code will be looked at and used to inform test cases. -Code coverage determines how well the code has been covered by the testing.

§Statement coverage -Have the set of tests together caused every part of the program/algorithm to run or take ettect?

§Decision coverage

  1. What happens in

-Have the set of tests together caused every decision the program/algorithm makes to be decided in every possibly way?

§Condition Coverage -Similar to decision coverage but refers to decisions that are stored as well as immediately acted on.

§Parameter Value coverage -If a sub-program takes inputs, have all common values for such inputs been considered?

In clear box testing we choose only one value for each set of conditions because clear box testing? further variation should make no ditterence to the program.

  1. What testing should you usual- ly use?
  2. How can both black box and white box testing alone fail?
  3. What are four types of testing?
  4. What is unit test- ing?

§You should usually use both black box and clear box testing on each program.

Black box testing alone can fail to test all parts of the code.

White box testing alone can fail to allow for all aspects of the specification, become "lost" in the code's structure, or miss faults caused by errors in the algorithm rather than the implementation.

-Unit Testing. -Integration Testing. -System Testing. -Regression Testing.

Unit testing involves testing individual units of a program separately.

While larger programs can be divided into parts, the focus is on testing small components.

defining an algo- rithm?

  1. What may we have to decide in an implemen- tation or require- ments specifica- tion?
  2. What can invalid data either be?
  3. What should we usually do if the invalid data is in- put?
  4. What can we do if the invalid data is supplied by an- other program- mer?

In an implementation or requirements specification we may have to decide what the program should do if an invalid value is input.

§Of the right type but outside of the applicable range (eg, tax rate = -50%) -This may produce a result but it will be incorrect or nonsensical. It may crash the program unless caught

§Of the wrong type (eg, tax rate = "fred the camel") -This is very likely to crash the program unless caught and any results will be meaningless.

Usually if invalid data is input by the user we should give the user a warning and move on.

If the invalid data is supplied by another programmer (because we are writing code to put in a library) then there are several choices:

§Return some kind of signal value that their program could detect (but we need to choose a suitable value and they need to know how to allow for it)

§Controlled crash (this warns the other programmer that they are using the library wrong and puts the onus on them to add validation if it's appropriate)

§Return an arbitrary value (this usually only applies in performance critical code

  1. What is user ac-

where checking the validity of the input would take substantial time, or where the function may be called multiple times on the same values meaning that checking them over and over is a waste of time)

§We may want to test our software by asking users to interact with it. ceptance testing? §This is often done for testing non-technical properties such as user friendliness, or subjective ones such as performance. §Usually has to be done with care as it can be expensive and take time to involve users.

  1. What is not considered user friendly?
  2. What may the user also want to do?
  3. What is automat- ic testing?
  4. What is source code inspection?
  5. What can source inspection auto- matically detect?

asking the user to enter a new value if they entered an invalid one is not considered user friendly on modern systems.

§Stop the program completely §Change their answer to a previous question §Get more explanation about the range

-Some development systems allow us to set up tests that run automatically.

-When we tell the program to run tests it automatically runs a series of tests and reports the results

-Source code inspection is not technically a form of testing, but it can prevent problems in the same way.

-Having someone else, or an automated system, examine the source code for potential errors or suspicious sections.

Most IDEs now perform some source inspection automatically while the program is being typed. This can detect things like:

-Variables not being initialized;