Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced Test plan tutorial (infra) #1662

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Advanced Test plan tutorial (infra) #1662

wants to merge 3 commits into from

Conversation

Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Dec 19, 2024

Description

This is an additional advanced tutorial about test plans. It should introduce all topics related to test plan writing and useful tips to work with them

Resolved issues

Fixes: CHECKBOX-760

Documentation

(this is documentation)

Tests

N/A

Copy link
Collaborator

@pieqq pieqq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice stuff!

I've added a few suggestions, and a question regarding the use of template id Vs. regex.

Comment on lines +3 to +5
=================
Writing Test Plan
=================
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
=================
Writing Test Plan
=================
===================
Writing A Test Plan
===================

=================

This tutorial will guide you in writing a test plan to test the Network
connection in your machine. We will do this by re-using tests that are already
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
connection in your machine. We will do this by re-using tests that are already
connection on your machine. We will do this by re-using tests that are already

Inclusions
==========

When we want a test plan to contain a test what we do in Checkbox is including
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When we want a test plan to contain a test what we do in Checkbox is including
When we want a test plan to contain a test, what we do in Checkbox is including

☑ : Test that the network speed is acceptable

Note how, as we previously saw, Checkbox automatically pulled the resource
job need. This operation, as we previously mention, is not the safe way to go
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
job need. This operation, as we previously mention, is not the safe way to go
job needed. This operation, as we previously mentioned, is not the safe way to go

``providers/tutorial/units/test-plan.pxu``

We now have a convenient container where to put all tests we previously
developed, let's include them in a new ``test plan``.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
developed, let's include them in a new ``test plan``.
developed, let's include them in a new ``test plan``:

Excluding a test via ``exclude`` in the test plan is different from using
``exclude`` in the launcher. If you use ``exclude`` in the launcher, you
are modifying the test plan, so it will not be accepted as a submission on
C3, while if you use ``exclude`` in a test plan, you are creating a new,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
C3, while if you use ``exclude`` in a test plan, you are creating a new,
C3, whereas if you use ``exclude`` in a test plan, you are creating a new,

Comment on lines +345 to +346
jobs, you should most likely avoid doing that as you may inadvertently lose
more jobs (and time) than you were aiming for. Try to always precisely match
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
jobs, you should most likely avoid doing that as you may inadvertently lose
more jobs (and time) than you were aiming for. Try to always precisely match
jobs, you should most likely avoid doing that as you may inadvertently deselect
more jobs than you were aiming for. Try to always precisely match

jobs, you should most likely avoid doing that as you may inadvertently lose
more jobs (and time) than you were aiming for. Try to always precisely match
what you want to exclude, for templates, for example, use the template id
whenever you can instead of regex matching the generated id
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
whenever you can instead of regex matching the generated id
whenever you can instead of regex matching the generated id.

Comment on lines +382 to +383
The reason is that all tests in the ``submission-cert-automated`` are mandatory
includes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The reason is that all tests in the ``submission-cert-automated`` are mandatory
includes
The reason is that all tests in the ``submission-cert-automated`` nested part are mandatory
includes: they will be executed regardless of any other rule in your test plan.

bootstrap_include:
network_iface_info
include:
network_available_.*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were using a template id in the previous test plan definition, and you switched to regex. Is this intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants