I want to append a message to a log that includes the name of the test method that is about to be run. I want to do this in my setUp method in my test superclass so I don't have repeated code everywhere.
I wanted to do something like this:
- (void) setUp {
[super setUp];
[self log:@NSStringFromSelector(_cmd)];
}
However, _cmd always gives "setUp" as its string, whereas I want "test00TestTheThing"
Is there a way to do this?
I found this:
self.name
However, this gives me "-[AppUITests test00TestTheThing]"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With