Dark Mode Testing, Other Languages, Other Screens: One Test for All Variations
Dark mode testing without copying the test: keep one test that passes in light and dark mode, in every language and on every screen.
To test dark mode, other languages and other screens without copying the test, keep one test whose checks hold a version per variation.A run picks the variation, and the steps stay the same.
It is one of the most common problems in test automation.A test passes in light mode on your desk, then fails in dark mode, in French or on a colleague's laptop, while nothing is broken.
Why does a test fail in dark mode when nothing is broken?
Definition
A test does two things: it does what a user does, and it checks what the screen shows.
- The doing is the same in every variation.
The checking is not, because a correct screen looks different in dark mode, in another language or on another screen, and a check that expects one look fails the others.
In GUI Test Studio, what a check expects is the visual target of a Visual Assert, the expected text of a Text Assert, the shape of a Dynamic Text Assert or the arrangement of a Layout Assert.The recording gives each check its first expected look, called the default.
Dark mode, another language, another screen: what changes on a correct screen
The same screen can rightly look different.The app is not broken, it is shown in another variation, and a check that holds one version cannot tell the difference.
| Variation | What changes on a correct screen |
|---|---|
| Dark mode and high contrast | Every background, text colour and icon changes, so every picture differs from the light look. |
| Another language | Words get longer or shorter, buttons grow, lines wrap, and a right-to-left language mirrors the layout. |
| Another screen | A laptop at 150 % scaling and a 4K monitor at 100 % draw the same button with other pixels. |
| Another version of Windows | Fonts, corners, shadows and scroll bars differ between Windows 10 and Windows 11. |
| Another edition of your app | A white-label customer's colours and logo, or a feature that only some plans show. |
Why copying the test for each variation does not last
When a correct screen keeps failing in one variation, teams usually reach for one of three shortcuts.
A copy per variation
A change to the workflow is made four times.
One test
Checkout test
A change to the workflow is made once.
| The shortcut | What it costs |
|---|---|
| A copy of the test per variation | Every change of the workflow is made two, three or five times, and the copies drift apart. |
| A looser check | A check loose enough to accept the dark look also accepts a missing icon or a wrong colour in the light one. |
| No visual check in that variation | The test still clicks through, but black text on a dark background ships unnoticed. |
A looser check cannot tell an intended new look from a bug.Only an expected look for that variation can.
Why a passing test can still miss what users see is the subject of visual bugs your automated tests miss.Why a check that fails for no reason is worse than no check is in flaky tests and false positives.
What it takes in a coded test framework
In a coded framework such as Playwright, Selenium or Cypress, the variations are yours to build and keep up in code.
| What you keep up | In a coded framework | In GUI Test Studio |
|---|---|---|
| The expected pictures | A folder of reference screenshots for each theme, language and browser, kept next to the test code. | Inside the one test file, as a version per variation of each check. |
| Switching the variation | A configuration or code that branches on the theme or the language. | A profile chosen for the run. |
| The words typed in each language | Test data per language, wired into the test code. | A version of the Type Text step for that language. |
| A new look after an intended change | A run with a flag such as --update-snapshots, then a review of the changed files. | Accept the new look in the report, in one click, then Save. |
The idea is the same: one variation, one set of expectations.What differs is how much you write and maintain to get there.
One test for all variations: baseline profiles
GUI Test Studio, which automates end-to-end tests on Windows without code, keeps every version inside the test.You name your variations as baseline profiles, such as Dark mode, French, 4K monitor or Windows 10.Each check can then hold one version of what it expects per profile, next to its default.
One Visual Assert
Default
as recorded
Dark mode
a profile you add
French
a profile you add
Shared by every version
| Word | Meaning |
|---|---|
| Default | What was recorded.It can be renamed but never removed, and every run uses it unless you pick a profile. |
| Baseline profile | A named variation you add to the test.It is only a name until its checks get their versions. |
| Version | One check's expected look for one profile: a picture, a text, a shape or an arrangement. |
Every kind of check can hold versions: Visual Asserts, Text Asserts, Dynamic Text Asserts and Layout Asserts.In a Group Assert, each member holds its own.See the Baselines guide for every window involved.
What changes from one variation to the next, and what never does
A profile changes what a check expects.It never changes how the check looks for it.
| Check | A profile's version holds | Shared by every version |
|---|---|---|
| Visual Assert | Its visual target, the picture it looks for. | The Search Scope, the timeout and the Verification Strictness. |
| Text Assert | The expected text, its precision and the case. | The Search Scope and the timeout. |
| Dynamic Text Assert | The shape of text it waits for. | The Search Scope and the timeout. |
| Layout Assert | The elements and their arrangement. | The Search Scope and the timeout. |
Testing an app in several languages: the steps change too
A test in another language often needs more than other pictures.It types other words, opens another address or uploads another file.So every step of the test can hold a profile's version of what it does, while its place on the screen and its moment stay shared.
| Step | Default | French profile |
|---|---|---|
| Type Text | Hello, I need help | Bonjour, j'ai besoin d'aide |
| Key Press | Ctrl+B | Ctrl+G |
| Open Web App | shop.example.com/en | shop.example.com/fr |
| Upload File | invoice.pdf | facture.pdf |
| Run App | Setup.exe | Setup.exe /lang=fr |
A shortcut can differ too: in Microsoft Word in French, bold is Ctrl+G rather than Ctrl+B, so the Key Press step holds a French version.
The default types an English message and expects the English confirmation.Under the French profile, the same Type Text step types the French message, and the Text Assert expects the French confirmation.One test, two languages, and a change to the workflow is made once.
How a Text Assert reads and compares a text is explained in Text checks.
How to add dark mode to an existing test, step by step
The quickest way to fill a profile is a run under it.The checks that look different fail, you review them, and you keep the ones that are right.
Run
Under the profile
Review
Each failed check
Accept
For that profile
Save
Into the test
- 1
Name the profile
In Settings, Project Settings, add a baseline profile named Dark mode in the Baseline Profiles card.A profile is only a name until its checks get their versions.
- 2
Run the test under the profile
Switch your app to dark mode.On the test's page in GUI Test Runner-Recorder, choose Dark mode in the Baseline row, then click Run Test.
The Baseline row picks the profile of the next run, and it is remembered for that test. - 3
Review each failed check
The checks still compare against the light look, so the ones that look different fail.Open each one in the Confidence Report and decide whether the dark look is right.
- 4
Accept the dark looks that are right
Click Accept actual as baseline for Dark mode on each check you reviewed.The default light look stays as it was.
Run under a profile, the Accept button files the new look under that profile. - 5
Save, then run again
Save the report's changes into the test, and run it once more under Dark mode.Every check now compares against its own dark version.
Or capture the version in GUI Test Studio
Select a check, open its Baselines tab and select the profile.Every field of the Properties panel now shows that profile's version, and an edit of what the check expects goes into it.Capture... starts a screen capture with the check's region drawn where it stood, and Capture the Same Region takes the profile's picture from that very place.
You can also ask your AI assistant to add a profile or capture a version, through Create a test from a prompt.
When the app changes on purpose: accept the new look in one click
A new look is accepted when the app changes on purpose.Accept only what you have reviewed, and keep a way back.
| When | What to do in GUI Test Studio |
|---|---|
| A check failed and the new look is right | Accept the actual result in the Confidence Report.Ctrl+Z takes it back until you save. |
| The element was not found at all | Accept its best region, the closest place found, as the new expected look. |
| A text changed on purpose | Edit the expected text in the report.Under a profile, the edit is saved as that profile's version. |
| The new look becomes the main one | Make Default turns a profile's version into the default and keeps the old default under that profile. |
| A profile is renamed or removed | Do it in Project Settings: every check of the test follows. |
Update a test after a change walks through the report's accept, and the Confidence Report explains everything it shows.
Run every variation in CI/CD
This run
Baseline: Dark mode
Save button · Visual Assert
its Dark mode version
Order total · Text Assert
its Dark mode version
Company logo · Visual Assert
no Dark mode version yet: the default is used, and the report says so
A run uses one profile.In GUI Test Runner-Recorder, it is the Baseline row of the test's page.On a build agent, gtr-cli takes --baseline-profile followed by the profile's name.
gtr-cli run tests\Checkout.GTS --junit results\default.xml
gtr-cli run tests\Checkout.GTS --baseline-profile "Dark mode" --junit results\dark.xml
gtr-cli run tests\Checkout.GTS --baseline-profile "French" --junit results\french.xml- A check without a version for the profile compares against its default, and the report says which profile the run used and how many checks had a version for it.
- A profile name the test does not have runs the default, and gtr-cli says so and lists the profiles the test has.
- The run history keeps the profile each run used.
Run tests in your pipeline lists every option of gtr-cli.
Browsers and devices are handled another way
A web test does not need a profile per browser or device: GUI Test Runner-Recorder generates a version of the recorded test for Chrome, Edge, Firefox and emulated phones and tablets, with pictures cut from each one.See cross-browser testing from one recording.
Baseline profiles are for what changes the look of the same app on the same kind of screen: a theme, a language, a scaling, a version of Windows or an edition of your app.That works for desktop apps, web apps, games and phones alike.
What to know before you start
| Limit | What it means |
|---|---|
| One profile per run | Two variations are two runs.A pipeline runs the test once per profile. |
| A shared Search Scope | There is no Search Scope per profile.If an element stands far elsewhere in one variation, widen the check's Search Scope. |
| No sets per code branch | There are no separate sets of expected looks per code branch.To prepare a new look before it ships, fill a profile from runs, then use Make Default when it ships. |
Key takeaways
- 1A test that expects one look fails a correct screen in dark mode, in another language, at another scaling or on another version of Windows.
- 2Copies and looser checks do not last: the copies drift apart, and a looser check hides real bugs.
- 3GUI Test Studio keeps every variation inside one test, one version per baseline profile, for every check and every step.
- 4Where to look, how long to wait and how strict to be stay shared, so no variation makes the test more forgiving.
- 5A run picks one variation, and a new look comes from accepting a reviewed result in the Confidence Report.
Questions
Why does my automated test fail in dark mode?
Because it expects the light look.Every check that compares a picture of the screen sees other colours in dark mode and fails, although the app works.The fix is not a looser check but a dark version of what each check expects.
How do I test dark mode and light mode with the same test?
Keep one test and give it a Dark mode baseline profile.Run it once under the default and once under Dark mode: the steps are the same, and each check compares against the look of the variation being run.
How do I test an app in several languages without copying the test?
Give the test a profile per language.Under the French profile, a Text Assert expects the French words, a Visual Assert the French picture, and a Type Text step types the French input.A change to the workflow is then made once for every language.
Why do my tests fail on another screen resolution or scaling?
A laptop at 150 % scaling and a 4K monitor at 100 % draw the same button with other pixels, so a picture taken on one does not match the other exactly.Add a profile for that screen and accept its look once, from a run you have reviewed.
What happens when a check has no version for the variation I run?
It compares against its default, the look that was recorded.The Confidence Report says which profile the run used and how many checks had a version for it, so a failure caused by a missing version is easy to recognise.
How do I update the expected look after an intended change?
Review the failed check first, and accept the new look only when the change was intended.In GUI Test Studio, the Confidence Report's Accept button does it for one check, undoably, and Save writes it into the test, under the profile the run used.
Can I run every variation in a CI/CD pipeline?
Yes, one run per profile. gtr-cli takes --baseline-profile followed by the profile's name, so a pipeline runs the test once with the default and once per profile, each with its own results.
Should I make a profile for each browser?
Not for a web test.GUI Test Studio generates a version of a recorded web test for Chrome, Edge, Firefox and emulated phones and tablets, with pictures cut from each one.Baseline profiles are for what changes the look of the same app: a theme, a language, a screen or a version of Windows.
Playwright, Selenium, Cypress, Microsoft Word and Windows are trademarks of their respective owners.
Keep reading
All articles
Visual testing
Pixel-Perfect Screenshot Testing: Why It Fails, and What Catches Real Visual Bugs
12 min read

Visual testing
Visual Bugs Your Automated Tests Miss: How to Test What Users See
10 min read

Test automation
Manual Testing vs Automated Testing: Why Manual Testing Falls Short for End-to-End Tests
15 min read