Comments (6)
Hello @aim2120 and thank you for reporting this 🙌
Have you tried executionTimeAllowance?
In addition, as a developer, I would like an opt-in way to force muter to exclude specific code from mutation. I imagine it like the following:
await withCheckedContinuation { continuation in
fetchMessages { messages in
// muter: skip
continuation.resume(returning: messages)
}
}
from muter.
Hey @Nikoloutsos thanks for the response! Unfortunately executionTimeAllowance
doesn't scale reasonably well for me. I'm working in a codebase with many other developers and trying to enable mutation testing for all of them, without needing to change all of their test code.
Honestly, the best solution I see is to allow muter to enable timeouts itself via config. That way muter can guarantee that it will complete, regardless of the behavior of the test executable.
I was trying some stuff out locally and it seems -test-timeouts-enabled
and -maximum-test-execution-time-allowance
aren't a great solution, since they automatically retry multiple times (I haven't found a way to disable this retry behavior using xcodebuild
).
from muter.
hi @aim2120, could you provide a brief code snippet where I can reproduce the issue and check if the flags are enough?
In the mean time, you can disable the operators from being injected into this part of the code
from muter.
Sure, here's an SPM library that hangs when you run muter
. This is because the mutation applied removes the line continuation.resume
.
So there's actually a few negatives about the flags -test-timeouts-enabled
and -maximum-test-execution-time-allowance
that I didn't realize when I wrote the initial post:
- They only work if the test executable is
xcodebuild
, so we can't use withswift
- They will automatically retry the test, so that the test has to timeout multiple times before
xcodebuild
fails. This causes muter to take much much longer, since a timeout of 3 minutes for example becomes (3 * # of retries) minutes.
How would you feel about introducing timeouts to muter itself? This could be configured via the muter config, with a default value of nil
if none is found, for backwards compatibility. This would mean that we can control the maximum test time, regardless of whether we're using xcodebuild
or swift
(or anything else), and doesn't require any fidgeting around with the limitations of the command executable.
from muter.
Oh, and just to reiterate what I said in my previous comment: I'm hoping to unlock using muter across many projects contributed to by multiple developers, so it's not feasible for me to figure out exactly which lines of code are potential hang points for mutations.
from muter.
Related Issues (20)
- Muter run throwing segmentaion fault HOT 11
- Mutation Schemata
- Migrate to versioned formulae (homebrew)
- Cannot write to file when run from Xcode 15 HOT 4
- Error: Could not parse buildRequest.json from build description path HOT 7
- Add Linux support HOT 2
- Use coverage to short-circuit mutation HOT 2
- Improve schemata testing HOT 2
- [Error]Swift/StringCharacterView.swift:158 Fatal error: String index is out of bounds HOT 7
- Reconsider defaultExcludeList values to be more specific HOT 3
- Muter discovered 0 mutants in 0 files or wrongfully fails tests when running on a new project with default config HOT 3
- RemoveSideEffectsOperator doesn't check for implicit return scenario HOT 4
- ApplySchemata step doesn't generate formatted code HOT 4
- Could not parse buildRequest.json from build description path HOT 1
- "error: invalid branch name: 'master'" when running on fresh swift package HOT 7
- Run mutations in parallel HOT 2
- Homebrew version of Muter very broken HOT 1
- Support xcodebuild as an executable for SPM projects HOT 2
- AcceptanceTests fail locally when using Sonoma 14.4.1 + Xcode 15.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from muter.