Logging and Reporting Mechanisms Flashcards

1
Q

(Within the TAS) One way of implementing the Test Execution Layer:

A

Writing test automation scripts from scratch.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Mention an example of test execution library in Python:

A

pytest

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

can run tests and report their results.

A

Unit test libraries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Pytest default tests selection and execution:

A

Looks for all files (in the current directory or its subdirectories.) which matches the specified pattern and then executes them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Main pytest flags that may modify its behavior:

A
  • Verbose mode: pytest -v
  • Quiet mode: pytest -q
  • Generate a report in HTML format: pytest –html=report.html
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Tests marks that can be put before a test definition so that pytest give it a special treatment.

A
  • @pytest.mark.skip: pytest will not run the test.

- @pytest.mark.xfail: the test is expected to fail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When a automated script test fails, what limitations does it have an error message?

A
  • is wholly insufficient.
  • frequently has no context
  • may have nothing to do with the actual failure which stopped the execution of the test.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is Logging?

A

a way to track events that occur during execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How the Logging gets done?

A
  • may be done before a step is taken and after a step is taken
  • may include the data that was used in the step
  • may include the behavior that occurred as a result of the step.
  • can help a test analyst determine quickly if the failure was caused by the SUT or not.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

If eventually, the project could reach a big size then the logging will be required.

A

It is more effective and efficient to start logging robustly from the start.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

At any point in an automated script, the automator may add logging calls to report out any information like:

A
  • general information for later tracing the test
  • warnings about something that happened that does not rise to the level of a failure
  • actual errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Five different levels of messages in Python (DIWEC: From lowest to highest levels):

A
  • DEBUG
  • INFO
  • WARNING
  • ERROR
  • CRITICAL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

DEBUG level purpose:

A

for diagnosing problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

INFO level purpose:

A

for confirmation that things worked

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

WARNING level purpose:

A

something unexpected occurred, a potential problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

ERROR level purpose:

A

a serious problem occurred

17
Q

CRITICAL level purpose:

A

a critical problem occurred

18
Q

if the console is set to level WARNING, the user will not see:

A

DEBUG or INFO messages, but will see WARNING, ERROR, and CRITICAL logging messages.

19
Q

Essentials steps to set the loggin level in Python:

A
  • import sentence: import Logging
  • level setting: logging.basicConfig(level=logging.WARNING)
  • write the desired logging message: logging.info(“my info message”)
20
Q

What is assertion?

A

Python built in device to check whether the correct data or behavior occurred:

21
Q

Assertion definition:

A

a statement that is expected to be true at a particular point in the script.

22
Q

assertion sintax:

A

assert sumVariable==4, “sumVariable should equal 4.”

23
Q

What is reporting?

A

supplying that information, and likely other contextual information to the various stakeholders, outward and upward, who want or need it.

24
Q

Two important advice about reporting:

A
  • determine who wants or needs reports and what information they are interested in.
  • in the way that it is possible, automate report creation and dissemination
25
Q

Report content:

A
  • a summary with an overview of the system being tested
  • the environment(s) the tests were run in
  • the results that occurred during the run.
26
Q

two ways to deal with reporting:

A
  • create them from the logs and other information and make them available to the stakeholders such they can download them when they want.
  • create and send the reports as soon as they are ready to the stakeholders who want them.