Continuous testing is the process of automatically running tests on software changes as part of the Continuous Integration and Continuous Delivery pipeline to find bugs early and ensure quality.
Click to reveal answer
beginner
Why is continuous testing important in CI/CD?
It helps catch errors quickly, reduces manual testing effort, speeds up feedback to developers, and improves software quality by testing every change automatically.
Click to reveal answer
beginner
Name two types of tests commonly used in continuous testing.
Unit tests (test small parts of code) and integration tests (test how parts work together) are commonly used in continuous testing.
Click to reveal answer
intermediate
How does continuous testing fit into the CI/CD pipeline?
After code is committed, continuous testing runs automated tests before the code moves to the next stage, ensuring only tested code is delivered.
Click to reveal answer
intermediate
What tools can be used for continuous testing in CI/CD?
Tools like Jenkins, GitLab CI, CircleCI, and testing frameworks like JUnit, Selenium, and Cypress help automate continuous testing.
Click to reveal answer
What is the main goal of continuous testing in CI/CD?
ATo delay testing until the final release
BTo manually test software after deployment
CTo replace all manual testing permanently
DTo find bugs early and ensure software quality
✗ Incorrect
Continuous testing aims to find bugs early and maintain quality by running automated tests during the CI/CD process.
Which test type is usually the fastest and most frequent in continuous testing?
AUnit tests
BPerformance tests
CUser acceptance tests
DSecurity tests
✗ Incorrect
Unit tests are small, fast tests that check individual parts of code and are run frequently in continuous testing.
When does continuous testing typically run in a CI/CD pipeline?
ABefore writing any code
BOnly after deployment to production
CAfter code commit and before deployment
DOnly during manual testing phases
✗ Incorrect
Continuous testing runs automatically after code is committed and before the code is deployed to catch issues early.
Which tool is NOT commonly used for continuous testing automation?
AGitLab CI
BPhotoshop
CJenkins
DSelenium
✗ Incorrect
Photoshop is a graphic design tool and not used for continuous testing automation.
What is a benefit of integrating continuous testing in CI/CD?
AFaster feedback on code quality
BMore manual testing effort
CLonger release cycles
DIgnoring test failures
✗ Incorrect
Continuous testing provides faster feedback to developers about code quality, helping fix issues quickly.
Explain how continuous testing improves software quality in a CI/CD pipeline.
Think about testing happening automatically and often.
You got /4 concepts.
List common types of tests used in continuous testing and their purpose.
Focus on tests that check code pieces and how they work together.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of continuous testing in a CI/CD pipeline?
easy
A. To automatically run tests on every code change
B. To manually test software after deployment
C. To delay testing until the final release
D. To only test code on the developer's machine
Solution
Step 1: Understand continuous testing concept
Continuous testing means running tests automatically during the CI/CD process.
Step 2: Identify the purpose in CI/CD
Its goal is to catch bugs early by testing every code change automatically.
Final Answer:
To automatically run tests on every code change -> Option A
Quick Check:
Continuous testing = automatic tests on code changes [OK]
Hint: Continuous testing means tests run automatically every change [OK]
Common Mistakes:
Thinking testing is manual only
Believing tests run after deployment
Assuming testing happens only once at release
2. Which of the following is the correct syntax to run tests in a simple CI pipeline using a shell command?
easy
A. sh tests.sh
B. run tests.sh
C. execute tests.sh
D. start tests.sh
Solution
Step 1: Recall shell command syntax
To run a shell script, the correct command is 'sh scriptname.sh'.
Step 2: Check each option
sh tests.sh uses 'sh tests.sh' which correctly runs the script. Others are invalid shell commands.
Final Answer:
sh tests.sh -> Option A
Quick Check:
Shell script run = sh script.sh [OK]
Hint: Use 'sh script.sh' to run shell scripts in pipelines [OK]
Common Mistakes:
Using 'run' or 'start' which are not shell commands
The pipeline runs 'echo "Starting tests"', then 'pytest tests/', then 'echo "Tests done"'.
Step 2: Understand output if tests pass
If pytest runs successfully, it outputs test results but here we focus on echo commands output. So output includes 'Starting tests' then 'Tests done'.
Final Answer:
Starting tests\nTests done -> Option C
Quick Check:
Echo commands print start and done messages [OK]
Hint: Echo commands print messages before and after tests [OK]
Common Mistakes:
Assuming pytest output is shown instead of echo
Mixing order of printed lines
Thinking tests failed without error
4. In a CI pipeline, the test step fails with error: sh: pytest: command not found. What is the most likely cause?
medium
A. The test script has a syntax error
B. The pipeline skipped the test step
C. The tests directory is missing
D. pytest is not installed in the pipeline environment
Solution
Step 1: Interpret the error message
The error 'sh: pytest: command not found' means the shell cannot find the pytest command.
Step 2: Identify cause in CI environment
This usually means pytest is not installed or not in PATH in the pipeline environment.
Final Answer:
pytest is not installed in the pipeline environment -> Option D
Quick Check:
Command not found = missing installation [OK]
Hint: Command not found means tool missing or not installed [OK]
Common Mistakes:
Assuming syntax error causes command not found
Thinking missing tests directory causes this error
Believing pipeline skipped the step without error
5. You want to add continuous testing to your CI/CD pipeline so tests run only if code changes affect the src/ directory. Which approach best achieves this?
hard
A. Run tests on every pipeline run regardless of changes
B. Configure the pipeline to run tests only when files in src/ change
C. Run tests only after deployment to production
D. Manually trigger tests after code review
Solution
Step 1: Understand conditional testing in CI/CD
To save time, tests should run only when relevant code changes occur.
Step 2: Apply file path filters in pipeline configuration
Configuring the pipeline to detect changes in src/ and run tests only then is the best approach.
Final Answer:
Configure the pipeline to run tests only when files in src/ change -> Option B
Quick Check:
Run tests conditionally based on changed files [OK]
Hint: Run tests only if relevant files change to save time [OK]
Common Mistakes:
Running tests every time wastes resources
Testing only after deployment delays bug detection
Manual triggers reduce automation benefits
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.