Posts

Post not yet marked as solved
3 Replies
1.1k Views
I am using XCUITesting with performance measurement blocks to ensure that certain tasks in the app don’t regress in how long they take to complete. I’m doing this with OS signposts, by logging signposts when the task begins and ends in the app, and then using the XCTOSSignpostMetric in the test to check the time elapsed against the baseline. This works well except for one case: I have a static library that defines a class that does certain work. That class is instantiated with the StaticString signpost name that should be used when it logs signposts. The app passes this StaticString parameter into the static library class’s constructor. In this case, the XCTOSSignpostMetric in the test never detects the signpost being logged. If I hard code a signpost name in the static library as a StaticString literal, it works. If I pass in a StaticString defined outside the static lib, the test doesn’t detect it when it is logged. Either way, I do see the signposts in Instruments. Only XCTOSSignpostMetric seems to not detect it in this non-functioning case. It seems like a bug, but I’m wondering if anyone else has encountered this or can suggest a workaround.
Posted Last updated
.