Istqb Certified Tester Foundation Level CTFL · Free Practice Question Easy

Question 49

A software developer is working on a new feature for a web application. The feature allows users to upload images to the application. The developer writes the code to upload the images, but they forget to include code to check the size of the images. As a result, users can upload images that are too large, which causes the application to crash. Which of the following is the error?

  • A

    The Developer forgetting to add code to check the image size.

  • B

    The application crashing

  • C

    The users uploading images with sizes that aren’t supported by the website.

  • D

    None of the above.

Reveal correct answer

Correct answer: A

Explanation

As per syllabus page 17:
1.2.3. Errors, Defects, Failures, and Root Causes

Human beings make errors (mistakes), which produce defects (faults, bugs), which in turn may result in failures. Humans make errors for various reasons, such as time pressure, complexity of work products, processes, infrastructure or interactions, or simply because they are tired or lack adequate training. Defects can be found in documentation, such as a requirements specification or a test script, in source code, or in a supporting artifact such as a build file. Defects in artifacts produced earlier in the SDLC, if undetected, often lead to defective artifacts later in the lifecycle. If a defect in code is executed, the system may fail to do what it should do, or do something it shouldn’t, causing a failure. Some defects will always result in a failure if executed, while others will only result in a failure in specific circumstances, and some may never result in a failure. Errors and defects are not the only cause of failures. Failures can also be caused by environmental conditions, such as when radiation or electromagnetic field cause defects in firmware. A root cause is a fundamental reason for the occurrence of a problem (e.g., a situation that leads to an error). Root causes are identified through root cause analysis, which is typically performed when a failure occurs or a defect is identified. It is believed that further similar failures or defects can be prevented or their frequency reduced by addressing the root cause, such as by removing it.

A.

The error (mistake) in this scenario is the developer forgetting to add code to check the size of the images. This omission leads to users being able to upload images that are too large, causing the application to crash. Implementing size checks is essential to prevent such issues and ensure the stability of the application.

B.

While the application crashing is a consequence of the error, aka a failure the root cause lies in the developer forgetting to include code to check the size of the images. The crash occurs due to the lack of validation for image sizes, highlighting the importance of implementing proper error handling and input validation in software development.

C. Users uploading images with sizes that aren't supported by the website is a symptom of the underlying issue, which is the developer's oversight in implementing image size checks. Without proper validation mechanisms in place, users can inadvertently upload images that exceed the application's capacity, leading to crashes and potential data loss.

D. None of the above is not the correct choice in this scenario, as the error stems from the developer's failure to incorporate image size checks in the code. Addressing this oversight is crucial to prevent application crashes and ensure a seamless user experience when uploading images.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need