Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Beliagal/qa-report-automation/llms.txt

Use this file to discover all available pages before exploring further.

The QA tool supports attaching one screenshot per test step as visual evidence of what happened during execution. These images are embedded directly in the generated PDF report, appearing immediately after the corresponding step’s data row so that reviewers can compare the obtained result with the screenshot without switching between documents. Screenshots are entirely optional — steps without an image are still fully valid report entries.

Supported File Formats

The file picker dialog filters for three image formats:
FormatExtension(s)
PNG.png
JPEG.jpg, .jpeg
Any other file type is hidden by the dialog filter. The filter string passed to filedialog.askopenfilename is ("Imágenes", "*.png *.jpg *.jpeg").

Attaching a Screenshot to a Step

1

Click the 📸 Imagen button

In the test step form, locate the 📸 Imagen button in the button row between the Obtenido field and the AÑADIR PASO button. Click it to open the operating system file picker dialog.
2

Select your image file

Navigate to your screenshot file in the dialog. Only PNG, JPG, and JPEG files are shown. Select the file and click Open (or the equivalent on your OS). The dialog is handled by Tkinter’s filedialog.askopenfilename, which returns the absolute path to the chosen file.
3

Confirm the selection

Once a file is chosen, the button label changes from 📸 Imagen to ✅ Imagen Ok and the button background switches to #2c3e50. This visual feedback confirms that a screenshot path has been stored in self.current_img and will be included when the step is committed.
4

Complete the remaining step fields

Fill in or verify the Acción / Input, Esperado, Obtenido, and Estado fields as described in the Test Steps guide. You can attach the image at any point before clicking AÑADIR PASO — the order does not matter.
5

Click AÑADIR PASO to commit the step

Click AÑADIR PASO. Inside _on_add(), the current value of self.current_img is written to the step dictionary under the key "img". After the step is appended to ReportData.pruebas and the session is saved, _clear_step() resets self.current_img to an empty string and restores the button to 📸 Imagen, ready for the next step.

How Screenshots Are Embedded in the PDF

During PDF generation, PDFService.generate_report() iterates over every step in ReportData.pruebas. After rendering the four-column table row for a step, it checks whether that step has an image:
# services.py — PDFService.generate_report()
if p.get('img') and os.path.exists(p['img']):
    pdf.ln(2)
    pdf.image(p['img'], x=pdf.get_x() + 10, w=100)
    pdf.ln(5)
Two conditions must both be true for the image to be embedded:
  1. The "img" key must hold a non-empty string.
  2. The file must exist on disk at that exact path at the time EXPORTAR PDF is clicked — os.path.exists(p['img']) must return True.
When those conditions are met, the image is placed on the PDF page with a left indent of 10 mm from the current cursor position and a rendered width of 100 mm. A 2 mm gap is added above the image and a 5 mm gap below, visually separating it from the next step row. The height is calculated automatically by fpdf2 to preserve the image’s aspect ratio.

Replacing a Screenshot Before Committing

If you clicked 📸 Imagen and selected the wrong file, simply click the button again while it still shows ✅ Imagen Ok. The file dialog will open a second time and the newly selected path will overwrite self.current_img. The button will remain in its confirmed state, reflecting the replacement.
Screenshot paths are stored as absolute file system paths in both self.current_img and the persisted sesion_testing.json session file. If you move, rename, or delete the image file after adding the step — but before exporting the PDF — os.path.exists() will return False and the image will be silently skipped during export. The rest of the report (text rows, metadata) will be unaffected.
Keep all screenshots for a test session in a single dedicated folder before you start testing — for example C:\QA\Sessions\HU-042\. This prevents accidental file moves and makes it easy to archive the entire session alongside the exported PDF and the sesion_testing.json file.

Build docs developers (and LLMs) love