Book: Mastering AI Test Automation with testRigor and Claude Code Get the Book.
Turn your manual testers into automation experts!Request a Demo

LibreOffice Testing: How to Test Your Office Workflows with testRigor

Weekly Newsletter
Receive weekly testRigor newsletters packed with insights on test automation, codeless testing, and the latest advancements in AI.
LibreOffice logo

LibreOffice testing helps ensure that documents, spreadsheets, and exported files work as expected. A document may open without an error, yet the changes you made yesterday are missing. A spreadsheet may display a formula instead of its calculated value, or a report may look correct in the editor but become unusable after PDF export. For organizations that rely on office software, these problems can be more disruptive than an application that simply refuses to start.

LibreOffice is a free, open-source office suite that includes Writer for word processing, Calc for spreadsheets, Impress for presentations, Draw for graphics, Base for databases, and Math for editing mathematical expressions. Its users range from individuals and schools to businesses and public institutions that depend on documents for their daily operations.

LibreOffice testing helps verify that the office workflows these users depend on remain reliable after software updates, configuration changes, or the introduction of new document templates. It is especially important when an organization exchanges files with other office applications or relies on a particular document format.

In this article, we will focus on native Windows desktop automation with testRigor, using actual executions of LibreOffice Portable. Most examples concern Writer, with additional guidance for testing spreadsheets in Calc.

What Should LibreOffice Testing Cover?

The most useful starting point is not a list of every toolbar button. Instead, identify the tasks people need to complete to produce, edit, share, and retrieve their work.

Prioritize the workflows that carry the greatest risk. For example, a school may depend on reusable Writer templates and PDF export, whereas a finance team may need stronger coverage of Calc formulas and spreadsheet compatibility.

What LibreOffice Already Checks, and What It Does Not

LibreOffice has its own automated testing infrastructure. The project’s C++ unit testing harness, UNO tests, UI testing framework, and component smoke tests provide different ways to detect regressions during development.

These checks are valuable, including the project’s existing UI tests. However, their existence does not establish that every workflow in your particular deployment has been exercised with your operating system, installed fonts, dictionaries, templates, document formats, and file locations.

You can complement the project’s coverage with three testing layers:

Unit Testing in LibreOffice

Unit testing checks individual pieces of software logic. For LibreOffice developers, examples of useful targets include spreadsheet functions, text manipulation, and document-model behavior. Organizations that develop their own extensions or macros can also test their isolated business logic where practical.

A test of a calculation function can establish that it returns the expected result for particular inputs. However, it does not necessarily establish that a user can enter that formula through Calc, see its result, and save the spreadsheet successfully.

Integration Testing in LibreOffice

Integration testing checks how components work together. In office software, important boundaries include the document model and its import/export filters, the application’s interaction with the filesystem, and integrations with extensions and external services.

For example, a test that saves a document and loads it through a document API can check whether its text and formatting survive the round trip. A PDF-export integration test can examine the generated output. These checks can provide more detailed validation than inspecting visible text alone.

For users, however, the experience also involves selecting the appropriate commands, completing file dialogs, handling warnings, and retrieving files. End-to-end tests add that perspective.

End-to-End LibreOffice Testing

End-to-end testing exercises a complete workflow as a person would perform it. Consider the following everyday journey:

Create a document → enter content → save it → close LibreOffice → reopen the file → verify the saved content.

This crosses several boundaries: the application interface, document editing, file storage, and document loading. In addition, it involves native Windows dialogs and application windows rather than just a web page.

The right automation tool therefore needs to work with desktop applications. Selenium and Playwright are useful for browser-based workflows, but neither is the appropriate primary tool for automating the native LibreOffice interface.

testRigor

testRigor supports native desktop automation on Windows and allows teams to describe actions in plain English. Instead of writing automation code for each menu, dialog, or toolbar, testers can use commands such as click "Save as" or describe the position of an element relative to another visible element.

Optical character recognition (OCR) is particularly useful when text is rendered inside the document area rather than exposed as a conventional input control. In the examples below, OCR checks help confirm that the expected text appears on the Writer canvas. This is a visible-content assertion, not a complete inspection of the underlying document structure.

See the testRigor language documentation for available commands.

LibreOffice UI Testing Framework

LibreOffice’s own UI testing framework is a natural option for contributors who need regression tests integrated with the project’s development process. It is especially relevant when a test needs to accompany a change to the LibreOffice source code.

Teams validating a deployed office environment can use external desktop automation alongside these source-level checks.

pywinauto

pywinauto is a Python library for automating Windows graphical interfaces through Win32 or Microsoft UI Automation. It gives technical teams programmatic control over application windows and controls. Teams need to maintain Python scripts and determine which controls the application exposes through the selected backend.

For teams that want office users and manual testers to participate in maintaining test scenarios, a plain-English approach offers a different balance between readability and technical control.

LibreOffice Testing with testRigor: How to Perform End-to-End Tests

We will automate the creation and saving of a Writer document, close the application, reopen it, and verify that the original text is still present. The demonstrated environment uses LibreOffice Portable on testRigor’s built-in Windows infrastructure.

Setting Up a Safe Test Environment

Use an isolated test desktop, with a dedicated application build and synthetic documents. Do not use personal or confidential files for automated tests. If you test an existing installation, use a dedicated Windows account and a test folder rather than a production user’s Desktop or shared drive.

For regression testing, record the LibreOffice version, installer or portable package, UI language, fonts, dictionaries, display settings, and document templates. Match the target deployment where these details affect the workflow. The examples use an English interface and a portable Windows installation; other environments may need different launch or dialog steps.

Create a Native Desktop Test Suite

Step 1: Log in to your testRigor account.

Step 2: Create a new test suite using the following configuration:
  • Test Suite Name: LibreOffice, or a descriptive name such as LibreOffice Windows Regression.
  • Type of testing: Native Desktop, not Desktop Web.
  • Where to run the tests: Use testRigor infrastructure to run tests on provided application.
  • OS: Windows.
  • Number of test cases to generate using AI: Select zero if you want to write the cases manually.
  • Upload file: Select the Windows application package. The interface supports EXE and MSI files compiled for x86 or x86_64, and ZIP files. For this walkthrough, use a compatible LibreOffice Portable installer and validate its startup flow.

Step 3: Click Upload and Create. The startup procedure depends on the package type. A portable installer is not the same as a ZIP containing an already extracted application. See the native desktop setup example for the different package-handling paths.

Step 4: Open Reusable Rules and prepare the installation and application-opening rules described below. Then select Add Custom Test Case in the suite.

Step 5: Enter a description, such as Create, Save, and Reopen a Writer Document, add the steps, and click Add and Run. The first test case guide explains the test editor.

If your organization needs to validate LibreOffice on an existing remote Windows machine, consult the separate remote desktop setup guide. That configuration uses a remote desktop connection and Windows Application Driver; it is not the built-in upload workflow demonstrated here.

Prepare LibreOffice Portable

The recorded executions used a reusable rule named install libreOffice to complete the installation wizard. The following steps come from the save-and-reopen test. Create the rule in testRigor before calling it, and check that the initial installer dialog is open.

Complete the wizard, wait for installation to finish, and start LibreOffice:
click "Ok"
click "Next"
click "Next"
click "Install"
wait up to 5 minutes until page contains "Completing LibreOffice Portable Setup"
enter 1 into checkbox "Run LibreOffice Portable"
click button "Finish"
check that page contains "Open File"
click "Maximize"
LibreOffice Portable installation completion and launch checkbox

The wait checks for the completion screen instead of assuming that installation takes a fixed amount of time. In the recorded cases, installation consumed a substantial portion of execution time. If your environment already has LibreOffice installed, replace this installation sequence with a rule that launches the application and checks that it is ready.

Test Data for LibreOffice Testing

The main example uses a simple filename and a short, recognizable text value. Both are synthetic and can be reused in an isolated environment.

Value Example Purpose
fileName Test file Name used to save and retrieve the document
content Lorem ipsum Text expected after reopening the document
File location Windows Desktop Isolated location selected in the file dialogs

For repeated runs on a persistent desktop, use unique filenames or remove only the test-generated files between runs. Otherwise, a previous document with the same name could trigger an overwrite prompt or make a persistence check pass for the wrong reason. Keep shared configuration in Test Data when several cases need it.

Test Case: Create, Save, and Reopen a Writer Document

The following walkthrough expands the reusable rules from the successful execution so you can see how the individual desktop interactions work. It assumes the installation rule has finished and the LibreOffice Start Center is visible.

Step 1: Create a Writer Document

Open Writer from the Start Center and type the expected document content. Saving the expected values first makes them available to later steps.

Select Writer Document from the LibreOffice Start Center
Create the document and enter the text:
save "Test file" as "fileName"
save "Lorem ipsum" as "content"
click "Writer Document"
enter saved value "content"
Writer document containing the test text Lorem ipsum

Step 2: Save the Document

Open the File menu, select Save as, and save the document to the Windows Desktop. The relative reference to Edit helps distinguish Writer’s File menu from other possible matches on the screen.

Windows Save As dialog for the Writer test document
Use the stored filename in the save dialog:
click "File" on the left of "Edit"
click "Save as"
enter saved value "fileName"
click "Desktop" above "Downloads"
click "Save"

The recorded scenario uses the default document format offered by Writer. If a particular format matters to your organization, explicitly select it and handle any format-confirmation dialog in a separate, verified variant of the test.

Step 3: Close and Reopen LibreOffice

Checking the text immediately after saving would only prove that it is still visible in the current session. Close the application and reopen it to exercise loading the persisted file.

In the recorded Windows environment, a LibreOffice folder on the Desktop contains the portable launcher. The original open libreOffice rule navigates to that launcher and manages the resulting windows.

LibreOffice Portable launcher selected in Windows File Explorer
The recorded sequence is:
click button "Close"
double click "LibreOffice"
double click 2nd "libreOfficePortable" below "Name"
click "Minimize"
click "Minimize"
click "File"
click "Close"
click "LibreOffice"

In this case, the two Minimize actions and the ordinal reference reflect the particular desktop layout rather than universal LibreOffice requirements. If the installation path or window order changes, adapt the reusable rule so that it reliably returns to the Start Center.

Step 4: Open the Saved File

Use Open File from the Start Center, navigate to the same folder, and select the file by its stored name. This avoids creating a new document or depending on the order of recent documents.

Select the saved Writer document in the Windows Open dialog
Open the document:
click "Open file"
click "Desktop" above "Downloads"
click stored value "fileName"
click "Open" on the left of "Cancel"

Step 5: Verify the Saved Content

Check the document text after the file opens. The recorded OCR assertion restricts the search relative to Form in Writer’s menu bar, reducing the chance of matching unrelated window text.

Validate the content of the reopened document:
check that page contains "Lorem ipsum" roughly below "Form" using OCR
OCR assertion highlighting Lorem ipsum in the reopened Writer document

The recorded run passed this final assertion. Notice that the screenshot also includes a LibreOffice tip dialog. For a controlled regression environment, account for such startup dialogs so they do not interfere with later actions.

Complete Test Case

After creating the installation and application-opening rules, move the document creation and save actions into another reusable rule. The recorded execution used the following business-level sequence.

The complete case reads as follows:
save "Test file" as "fileName"
install libreOffice
create and save document saved value "fileName" with content "Lorem ipsum"
click button "Close"
open libreOffice
click "Open file"
click "Desktop" above "Downloads"
click stored value "fileName"
click "Open" on the left of "Cancel"
check that page contains "Lorem ipsum" roughly below "Form" using OCR

Create the three referenced rules before running this version. Their implementation depends on the installer, window layout, and parameters described in this article.

Execution Results

The save-and-reopen case was recorded as passed on December 2, 2025, with an execution time of 6 minutes and 16 seconds, including installation. Its final assertion confirmed the presence of the expected visible text after reopening the file.

Across the recorded executions from December 2025 and August 2026, eleven cases carry a Passed status and one carries a Failed status. These are individual recorded executions, not a single full regression run. The Calc case does not include formula steps, so its Passed status alone is insufficient to confirm formula correctness.

When reviewing testRigor results, inspect the failed step, error details, and screenshots before deciding whether an application defect or a test-environment issue caused a failure. The hyperlink case below illustrates why this distinction matters.

High-Value LibreOffice Testing Scenarios

The following examples extend the document-persistence case. Unless otherwise specified, the code excerpts come from recorded executions and assume that the installation rule has completed. Create each document independently so the tests do not depend on one another.

1. Verify Editing, Undo, Redo, and Font Selection

Users need to reverse accidental changes and restore them without losing unrelated work. The recorded Undo/Redo case types text, removes it with Undo, and checks that Redo restores it.

Use OCR to verify both states of the document:
click "Writer"
enter "Test"
click "Undo"
check that page does not contain "Test" roughly below "Edit" using OCR
click "Redo"
check that page contains "Test" roughly below "Edit" using OCR

Both assertions passed in the recorded case. Checking the document rather than just whether the Undo button is enabled makes this a more meaningful functional test.

Another recorded case changes the selected font to Arial, enters text, and confirms that the text remains visible:
click "Writer Document"
save "Hello" as "customText"
enter "Arial" into "Font"
type enter
enter saved value "customText"
check that page contains saved value "customText" roughly below "Form" using OCR

That case verifies text entry following a font-selection action, not the actual font applied to the saved text. For stronger formatting coverage, add a separate assertion of the selected font or inspect the saved document’s formatting properties. Make sure the required font is installed on the test machine.

2. Verify Find and Replace and Spellchecking

A Find and Replace regression can affect reports, contracts, and reusable documents. Test that the original text disappears and the replacement appears after closing the dialog.

Find and Replace dialog configured to replace Bat with Frog
The recorded replacement case changes Bat to Frog:
click "Writer"
enter "Bat"
click "Find and Replace"
enter "Bat" into "Find"
enter "Frog" into "Replace"
click "Replace All"
click "Close"
check that page roughly below "Edit" does not contain "Bat" using OCR
check that page roughly below "Edit" contains "Frog" using OCR

For spellchecking, control the language and installed dictionary. Suggestions can vary between environments, so verify the expected correction for the language in use.

Spelling dialog showing Forq and the suggested correction Ford
The recorded spelling case replaces Forq with Ford:
click "Writer"
enter "Forq"
click "Spelling"
check that page contains "Forq" roughly below "Not in Dictionary" using OCR
click "Ford"
click "Correct"
check that page contains "The spellcheck is complete."
click "OK"
click "Close"
check that page contains "Ford" roughly below "Edit" using OCR

The final check confirms the correction in the document itself, rather than relying exclusively on the spellcheck completion message.

3. Verify Page Breaks and Document Templates

Page breaks affect reports, letters, and documents intended for printing. A recorded case inserts a page break in a new Writer document and uses the Go to Page dialog to confirm the document has two pages.

Check the resulting page count:
click "Writer"
click "Page Break"
click "Pages" using OCR
check that "Go to Page" contains "of 2"

This verifies the page count for an empty document with a page break. For document layouts that must meet strict requirements, extend coverage to actual content positioning and exported output.

A separate recorded template case opens Modern business and checks its sample text:
click "Writer"
click "File" on the left of "Edit"
hover over "Templates"
click "Manage Templates"
click "Modern business"
click "Open"
click "OK"
check that page contains "Lorem Ipsum" roughly below "Edit" using OCR
Modern business template opened in Writer with Lorem Ipsum highlighted

Adapt this scenario to your organization’s templates. Checking a known heading or other distinctive content provides evidence that the intended template loaded. A more complete test would also edit and save a document based on it and confirm that the original template remains unchanged.

4. Verify Saved Files and Recent Documents

A basic recorded save case minimizes Writer and checks for the saved filename on the Windows Desktop. That confirms the expected name is visible there, but does not by itself prove that the file contains the correct data.

A separate passing case from August 3, 2026, creates a document named Custom document, closes LibreOffice, and uses the same application-opening rule from the walkthrough.

After preparing the reusable rules, the recorded business-level actions are:
create and save document "Custom document" with content "content"
click "Close"
open libreOffice
check that page contains "Custom document"

This checks for the name after reopening the application. For stronger recent-document coverage, open the corresponding entry and confirm its content. For instance, the main walkthrough demonstrates how a separate file-reopening test can validate persistence.

5. Verify PDF Export and Open the Result

When users share invoices, assignments, or reports as PDFs, the existence of an export button is not enough. The generated file should open and display the expected content.

For example, the following recorded case exports a Writer document to the Desktop and opens the resulting file:
click "Writer"
enter "Test text"
click "Export Directly"
click "Desktop" above "Downloads"
enter "Test.pdf" into "File name"
click "Save"
click "Minimize"
check that page contains "Test"
double click "Test"
check that page contains "Test text" using OCR
Exported PDF displaying Test text highlighted by OCR

The final OCR check passed. It provides evidence that the exported document could be opened and that the sample text was visible. It does not validate every page, embedded font, PDF accessibility property, or exact layout. Use more detailed file or visual checks for those requirements. Also ensure that no unrelated file named Test can be selected and that the test desktop has a suitable PDF viewer.

6. Verify Spreadsheet Formulas in Calc

Spreadsheet errors can be difficult to notice because an incorrect number may look perfectly ordinary. Use known input values and independently calculated expected results to test the formulas that matter to your organization.

For example, a useful proposed Calc scenario is to enter 10 and 20 into cells A1 and A2, then enter =SUM(A1:A2) into A3. Verify that A3 displays 30. Change A1 to 15 and check that A3 recalculates to 35. Save and reopen the spreadsheet to verify that the formula and resulting value persist.

The recorded Calc execution from August 3, 2026, is marked Passed but only covers the installation and the action opening Calc. It does not include the formula-entry or result-assertion steps. Consequently, the example above is a recommended additional test, not a verified execution. Capture the actual cell-navigation commands and value assertions in your environment before adding it to a regression suite.

Hyperlinks often connect office documents to internal resources, supporting information, or external websites. A complete hyperlink test should create the link, confirm its displayed text, activate it, and verify the intended destination using a controlled URL.

In the recorded hyperlink execution, opening the hyperlink interface with enter ctrl+k was marked as passed, but subsequent actions could not locate the URL and Text inputs or the OK button. The case failed before the hyperlink was created or activated.

This does not establish that LibreOffice’s hyperlink feature is defective. Inspect the active window, actual dialog labels, keyboard focus, and screenshot at the failed step. Confirm that the expected dialog is visible before entering its values, then rerun the case. Do not count this journey as covered until the destination is verified.

File compatibility is another important area for organizations exchanging documents with other office suites. LibreOffice supports native OpenDocument formats as well as other formats, including Microsoft Office formats. Add separate round-trip tests for the formats you use, such as ODT, ODS, DOCX, and XLSX, checking representative text, formulas, formatting, and layout. The recorded cases in this article do not establish cross-format compatibility.

Reusable Rules for LibreOffice Testing

Reusable Rules help keep desktop tests focused on the task rather than the details of starting the application and navigating windows. The executions used three repeated sequences:

Rule Responsibility
install libreOffice Complete the portable installer and launch the application
open libreOffice Launch the installed portable application and restore the Start Center
create and save document ... with content ... Accept a filename and content, create a Writer document, and save it

The parameterized create-and-save rule supplies the two stored values used by its internal steps. Define the parameters for the filename and content using testRigor’s reusable-rule editor, and use the recorded Writer and Save As steps from the walkthrough as the body. See the Reusable Rules documentation for parameter syntax and configuration.

This separation is particularly helpful when moving from a portable package to an already installed application. As a result, the startup rule can change without rewriting every spelling, formatting, or export scenario.

LibreOffice Testing Tips for Reliable Automation

  • Control application startup. Validate the expected window before interacting with it. Installation, first-run dialogs, and the Start Center are distinct states.
  • Use a predictable desktop. Keep the UI language, window size, display scaling, font availability, and dictionary consistent. Test other configurations separately when they matter.
  • Use relative references where needed. The recorded tests distinguish the File menu using Edit and the Desktop folder using Downloads. Repeated labels in File Explorer and application windows can otherwise cause ambiguous matches.
  • Use OCR selectively. OCR helps read rendered document content. It does not establish font properties, document structure, or exact formatting; add complementary checks for those requirements.
  • Verify the final result. Reopen a document after saving, open the exported PDF, check the replacement text, and validate a spreadsheet’s computed value.
  • Keep files and profiles isolated. Avoid old documents, overwrite prompts, and open windows from other tests. If cases share a desktop or profile, serialize them or use separate environments.
  • Review failed interactions before changing assertions. A missing control can indicate a different dialog, a focus problem, an automation recognition issue, or an application regression.

When to Run Your LibreOffice Testing Suite

Run the most important office workflows before and after deploying a LibreOffice upgrade. Repeat the relevant cases when changing operating system versions, default document formats, fonts, dictionaries, templates, extensions, or shared-file configurations.

A small smoke suite can check application startup, document saving and reopening, and PDF export. A broader regression suite can include more extensive editing, spreadsheet calculations, file compatibility, and templates. For technical teams, these tests can also complement existing build and release checks; consult the testRigor CLI documentation for integration options appropriate to your configured suite. The examples here ran on testRigor’s built-in Windows infrastructure and are not part of LibreOffice’s own CI pipeline.

Conclusion

A practical LibreOffice testing strategy protects the work people produce, not just the application that opens it. A healthy toolbar is of little value if a saved document loses its content, an exported PDF cannot be read, or a spreadsheet produces the wrong result.

LibreOffice’s existing unit, integration, and UI testing infrastructure provides an important foundation. Native desktop end-to-end tests with testRigor add coverage of the complete workflows in a specific operating environment, including application windows, file dialogs, and visible document content.

Start with creating, saving, and reopening a Writer document. Add PDF export, editing, and the templates your users rely on, then extend the suite to Calc formulas and the document formats your organization exchanges. Use clear assertions and investigate failures rather than treating a successful application launch as proof that every office workflow works.

You're 15 Minutes Away From Automated Test Maintenance and Fewer Bugs in Production
Simply fill out your information and create your first test suite in seconds, with AI to help you do it easily and quickly.
Achieve More Than 90% Test Automation
Step by Step Walkthroughs and Help
14 Day Free Trial, Cancel Anytime
“We spent so much time on maintenance when using Selenium, and we spend nearly zero time with maintenance using testRigor.”
Keith Powe VP Of Engineering - IDT
Privacy Overview
This site utilizes cookies to enhance your browsing experience. Among these, essential cookies are stored on your browser as they are necessary for ...
Read more
Strictly Necessary CookiesAlways Enabled
Essential cookies are crucial for the proper functioning and security of the website.
Non-NecessaryEnabled
Cookies that are not essential for the website's functionality but are employed to gather additional data. You can choose to opt out by using this toggle switch. These cookies gather data for analytics and performance tracking purposes.