On & Off by Creativedash
muter-mutation-testing/muter 279
🔎 Automated mutation testing for Swift 🕳️
Beep-beep-boop Safe Area
Code samples from my blog.
rakaramos/google-auth-library-swift 1
Auth client library for Swift command-line tools and cloud services. Supports OAuth1, OAuth2, and Google Application Default Credentials.
rakaramos/Houaiss.dictionary 1
Dicionário Houaiss para MAC
Automated mutation testing for Swift
Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement.
fork ole/youtube-dl
Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
fork in 2 hours
startedangristan/feedbin-docker
started time in 20 hours
Self-host your own Feedbin RSS reader in Docker
fork in 21 hours
startedpavelfatin/typometer
started time in 5 days
startedtulir/mautrix-telegram
started time in 13 days
PR opened nshint/uicollectionview-reordering
pr created time in 13 days
startedlord/anchors
started time in 15 days
startedjanestreet/incremental
started time in 15 days
startedvis2k/Mirror
started time in 17 days
Pull request review commentmuter-mutation-testing/muter
#185 #189 process termination code
struct MutationTestingDelegate: MutationTestingIODelegate { savingResultsIntoFileNamed fileName: String) -> (outcome: TestSuiteOutcome, testLog: String) { do { let (testProcessFileHandle, testLogUrl) = try fileHandle(for: fileName)+ defer { testProcessFileHandle.closeFile() }
defer happens right before the scope closes. It should be the same behavior as before, but now it'll still happen if we add an early return. I was originally going to use a guard in an earlier version of this PR. I ended up not doing it, but I still like using defer for open/close patterns.
comment created time in 19 days
issue openedmuter-mutation-testing/muter
--files-to-mutate does not work for multiple files
During using Muter, I found out that it does not handle multiple file paths as an argument of --files-to-mutate. When I passed two files, I got
Discovering Swift files which Muter will analyze...
In total, Muter discovered 0 Swift files
I tried code from the Readme
muter --files-to-mutate $(echo \"$(git diff --name-only HEAD HEAD~1 | tr '\n' ',')\")
But had the same result.
Also, tried to launch acceptance test with modified files to mutate inside runAcceptanceTests.sh. Changed line 31 to
echo " > Running with --filesToMutate flag"
"$muterdir"/muter --files-to-mutate "/ExampleApp/Module.swift,/ExampleApp/Module2.swift" > "$samplesdir"/muters_files_to_mutate_output.txt
the test failed and I got the same result
Discovering Swift files which Muter will analyze...
In total, Muter discovered 0 Swift files
created time in 22 days
Pull request review commentmuter-mutation-testing/muter
#185 #189 process termination code
class TestSuiteResultParsingSpec: QuickSpec { context("when a test log doesn't contain a failure, runtime error, or build error") { it("returns a passed test result") { var contents = loadLogFile(named: "testRunWithoutFailures_withTestSucceededFooter.log")- expect(TestSuiteOutcome.from(testLog: contents)).to(equal(.passed))+ expect(TestSuiteOutcome.from(testLog: contents, terminationStatus: 0)).to(equal(.passed))
I used 0 for everything except the one case I cared about testing. We should probably think about whether any of the rest of these tests need to change or be expanded.
comment created time in 22 days
PR opened muter-mutation-testing/muter
Fixes #185 Fixes #189
Look at the process termination code instead of just parsing the logs. Correctly handles a case where the logs might mention the string "fatal error" even when the tests are passing.
pr created time in 22 days
create barnchmuter-mutation-testing/muter
branch : bugfix/zeveisenberg/185-189-process-termination-code
created branch time in 22 days
startedgit-town/git-town
started time in 24 days
startedPeternator7/strum
started time in a month
startedrajdeep/proton
started time in a month
startedreujab/silver
started time in a month
startedbmoliveira/MarkdownKit
started time in a month
startedkishikawakatsumi/swift-ast-explorer
started time in a month
Pull request review commentmuter-mutation-testing/muter
Display before-and-after code in the cli output when describing mutants that were applied
public extension XCTestCase { var exampleMutationTestResults: [MutationTestOutcome] { return [- MutationTestOutcome(testSuiteOutcome: .failed, mutationPoint: MutationPoint(mutationOperatorId: .ror, filePath: "/tmp/file1.swift", position: .firstPosition), operatorDescription: "from == to !="),- MutationTestOutcome(testSuiteOutcome: .failed, mutationPoint: MutationPoint(mutationOperatorId: .ror, filePath: "/tmp/file1.swift", position: .firstPosition), operatorDescription: "from == to !="),- MutationTestOutcome(testSuiteOutcome: .passed, mutationPoint: MutationPoint(mutationOperatorId: .ror, filePath: "/tmp/file1.swift", position: .firstPosition), operatorDescription: "from == to !="),+ MutationTestOutcome(+ testSuiteOutcome: .failed,+ mutationPoint: MutationPoint(+ mutationOperatorId: .ror,+ filePath: "/tmp/file1.swift",+ position: .firstPosition),+ mutationSnapshot: MutationOperatorSnapshot(+ before: "==",+ after: "!=",+ description: "from == to !="+ )+ ),+ MutationTestOutcome(+ testSuiteOutcome: .failed,+ mutationPoint: MutationPoint(+ mutationOperatorId: .ror,+ filePath: "/tmp/file1.swift",+ position: .firstPosition),+ mutationSnapshot: MutationOperatorSnapshot(+ before: "==",+ after: "!=",+ description: "from == to !="+ )+ ),+ MutationTestOutcome(+ testSuiteOutcome: .passed,+ mutationPoint: MutationPoint(+ mutationOperatorId: .ror,+ filePath: "/tmp/file1.swift",+ position: .firstPosition),+ mutationSnapshot: MutationOperatorSnapshot(+ before: "==",+ after: "!=",+ description: "from == to !="+ )+ ), - MutationTestOutcome(testSuiteOutcome: .failed, mutationPoint: MutationPoint(mutationOperatorId: .removeSideEffects, filePath: "/tmp/file2.swift", position: .firstPosition), operatorDescription: "from == to !="),- MutationTestOutcome(testSuiteOutcome: .failed, mutationPoint: MutationPoint(mutationOperatorId: .removeSideEffects, filePath: "/tmp/file2.swift", position: .firstPosition), operatorDescription: "from == to !="),+ MutationTestOutcome(+ testSuiteOutcome: .failed,+ mutationPoint: MutationPoint(+ mutationOperatorId: .removeSideEffects,+ filePath: "/tmp/file2.swift",+ position: .firstPosition),+ mutationSnapshot: MutationOperatorSnapshot(+ before: "==",+ after: "!=",+ description: "from == to !="+ )+ ),+ MutationTestOutcome(+ testSuiteOutcome: .failed,+ mutationPoint: MutationPoint(+ mutationOperatorId: .removeSideEffects,+ filePath: "/tmp/file2.swift",+ position: .firstPosition),+ mutationSnapshot: MutationOperatorSnapshot(+ before: "==",+ after: "!=",+ description: "from == to !="+ )+ ), - MutationTestOutcome(testSuiteOutcome: .failed, mutationPoint: MutationPoint(mutationOperatorId: .ror, filePath: "/tmp/file3.swift", position: .firstPosition), operatorDescription: "from == to !="),- MutationTestOutcome(testSuiteOutcome: .passed, mutationPoint: MutationPoint(mutationOperatorId: .ror, filePath: "/tmp/file3.swift", position: .firstPosition), operatorDescription: "from == to !="),- MutationTestOutcome(testSuiteOutcome: .passed, mutationPoint: MutationPoint(mutationOperatorId: .ror, filePath: "/tmp/file3.swift", position: .firstPosition), operatorDescription: "from == to !="),+ MutationTestOutcome(+ testSuiteOutcome: .failed,+ mutationPoint: MutationPoint(+ mutationOperatorId: .ror,+ filePath: "/tmp/file3.swift",+ position: .firstPosition),+ mutationSnapshot: MutationOperatorSnapshot(+ before: "==",+ after: "!=",+ description: "from == to !="+ )+ ),+ MutationTestOutcome(+ testSuiteOutcome: .passed,+ mutationPoint: MutationPoint(+ mutationOperatorId: .ror,+ filePath: "/tmp/file3.swift",+ position: .firstPosition),+ mutationSnapshot: MutationOperatorSnapshot(+ before: "==",+ after: "!=",+ description: "from == to !="+ )+ ),+ MutationTestOutcome(+ testSuiteOutcome: .passed,+ mutationPoint: MutationPoint(+ mutationOperatorId: .ror,+ filePath: "/tmp/file3.swift",+ position: .firstPosition),+ mutationSnapshot: MutationOperatorSnapshot(+ before: "==",+ after: "!=",+ description: "from == to !="+ )+ ), - MutationTestOutcome(testSuiteOutcome: .passed, mutationPoint: MutationPoint(mutationOperatorId: .ror, filePath: "/tmp/file 4.swift", position: .firstPosition), operatorDescription: "from == to !=") // this file name intentionally has a space in it+ MutationTestOutcome(+ testSuiteOutcome: .passed,+ mutationPoint: MutationPoint(+ mutationOperatorId: .ror,+ filePath: "/tmp/file 4.swift",+ position: .firstPosition),+ mutationSnapshot: MutationOperatorSnapshot(+ before: "==",+ after: "!=",+ description: "from == to !="+ )+ ) // this file name intentionally has a space in it
this comment should move to the appropriate wrapped line
comment created time in a month
issue openedmuter-mutation-testing/muter
Muter incorrectly fails when successful test contains "fatal error" text
TestSuiteOutcome.swift:57 checks to see if the entire test log contains the text "fatal error". But sometimes, this is valid in a test log. Instead, we should look at the process.terminationReason at MutationTestingIODelegate.swift:28. Related to #185.
One way to reproduce this is to have a test suite that uses assertionFailure("foo") in a test. The failure may not halt the process, but will still print a message.
We're still looking into why an assertionFailure would put Fatal Error in the log but not halt the tests; will post here if we find out.
A nice way to test this could be to mock Process so we can return arbitrary error codes without having to build a whole sample project to reproduce this issue.
created time in a month
startedsoulverteam/SoulverCore
started time in a month
startedapollographql/apollo
started time in a month
startedserverless/serverless
started time in 2 months
startedgithub/docs
started time in 2 months
issue commentmuter-mutation-testing/muter
Skip hidden folders when copying to temp
If we don't copy those, won't it either fail to build, or waste time regenerating those items? Can we ignore them from mutation testing, but still copy them?
comment created time in 2 months