Fuzzer
Fuzzer copied to clipboard
[question] [swift] Is fuzzer capable of intercepting failures in Swift code?
NSArray *reports = [runner enumerateMutantsUsingBlock:^(NSDictionary *mutant) {
[deserializer deserializeUser:mutant];
}];
We need to check if failures are recorded properly if deserializer
is written Swift and mention the status in the readme.
As far as I know, the main sources of failures are
- force unwrapped optionals (
operator !
) - force exception handlers (
try!
) - force casts (
as!
) -
unowned
captures in closures
Good point, I didn't check those cases.
I've tried
- force unwrapped optionals
-
fatalError()
function
Fuzzer runner fails to intercept both of them and the entire test bundle stops. For some reason the xcode's test report contains more than one test case with a crash and contains no records about other crash-free test cases.
Either xcode it has some treshold or the reason is "XCTest
parallelizes test runs".
Seems like Fuzzer might need an implementation of something like this https://github.com/Quick/Nimble/issues/234