This repository has been archived by the owner on Jun 20, 2023. It is now read-only.
[Debugging Trick] Use Build Scheme ENAScreenshots with specific Launch Arguments to test the user interface on the simulator #3804
Labels
alternative approaches
Alternative approaches Proposals for solutions that differ from current implementations
Problem:
With the simulator you are able to test and debug a lot of the cwa code.
However, a lot of code pathes are not easy to cover.
Examples are: What happens after a green or a red warning? After a red antigen test result? After a red PCR test result?
If you are mainly interested in testing and debugging of the user interface, the following trick may help you.
Let's start with an example: You are interested to test the user interface after a green warning.
Recipe for this specific use case:
The implementation sets several launch arguments, followed by the line
app.launch()
app.launch()
But the amazing part is: you can now take over, and manually test what you want (e.g. have a look at the explanations for the risk card, at the contact journal, etc)
Note: the supported launch arguments are defined in ENAUITests/LaunchArguments.swift
Do not forget:
The Scheme ENAScreenshots are configured with a focus to test the user interface.
Most of the processing "below the surface" is mocked, so you will not be able to debug the true code here.
The text was updated successfully, but these errors were encountered: