mudasobwa
Creator of Cure
Thanks to Brian @bglusman who provided a very valuable PR to this library, I am to introduce the mutation-testing library for BEAM languages named Muex.
Why another one, when we already have Darwin and Exavier? Well, because I like to write code (more formal comparison can be found here.)
This library is also a part of the Language Agnostic Code Audit SaaS effort, MIT-license. Here is the repo:
https://github.com/Oeditus/muex
Example outcome:
❯ mix muex --files "examples/cart/lib/cart/*.ex" --verbose
Loading files from examples/cart/lib/cart/*.ex...
Found 2 file(s)
Analyzing files for mutation testing suitability...
✓ examples/cart/lib/cart/product.ex (score: 100)
✓ examples/cart/lib/cart/shopping_cart.ex (score: 100)
Selected 2 file(s), skipped 0 file(s)
Generating mutations...
Applying mutation optimization...
Original mutations: 1541
Optimized mutations: 31
Reduction: 1510 (-98.0%)
Average impact score: 6.9
Testing 31 mutation(s)
Analyzing test dependencies...
Running tests...
×××·×××××·×××
---×××·×××××××××××
Mutation Testing Results
==================================================
Total mutants: 31
Killed: 3 (caught by tests)
Survived: 25 (not caught by tests)
Invalid: 3 (compilation errors)
Timeout: 0
==================================================
Mutation Score: 9.68%
Survived Mutations:
--------------------------------------------------
examples/cart/lib/cart/product.ex:144
Boolean: and to or
…
** (Mix) Mutation score 9.68% is below threshold 100%
Trending in Announcing
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.
This library uses Erlang esaml to provide
plug enabl...
New
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub.
Docs are at OpenaiEx User Gu...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
New
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto.
pagination
cursor pagination
sorta...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
Hey folks,
I just published a post about Hologram’s funding and where the project goes next - the short version:
Curiosum as Main Spons...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using.
We’re particularly inte...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
krisleech
Thanks for open sourcing this, I’m playing with it now. It great to have this in Elixir.
mudasobwa
v0.6.0is out, all kudos go to @bglusmanFixes:
:invalid, not:killedStatementDeletion&ReturnValuemutatorsFeatures:
lud
Very interesting project! Thank you. I left an issue on Github because it seems to have problem compiling my project that uses macros.
mudasobwa
Yeah, thanks! I am on it already.
lud
I had Claude Code left you a comment too, which may or may not be useful
mudasobwa
Nah, the thing is I overestimated my ability to deal with a dozen of projects faster than my AI assistant (I am kinda competing with her on that matter
)
Yesterday I messed up merging new features and in a rush I did not validate it 102%. Stay tuned, the working version is to be there soon.
mudasobwa
v0.6.1is out, thanks @lud for testing and reporting the bug.Fixes:
Code.compile_string/2lud
I’ll try as soon as possible
lud
Hello,
So I let it run with
mix muex --optimize --optimize-level aggressive --verboseand it still takes a lot of time. I believe JSV was a very bad match because there are 7000 tests. I’ll try to move the tests so I can target only the right subset (for now I have agenerated/tests directory insidetest/jsv/so I cannot target "all files except those in generated. But it could be nice to be able to pass exclusion flags tomix testto exclude a@moduletag`.Then about the results I’m not so sure how to interpret them.
If I return nil from the function defined I have 52 test failures when running manually.
This is a
@doc group @doc_group. I also have results about removing a@doc falsestatement. Those should be ignored.I’m not sure what is statement 36:
Some results file:line point to a
defstructstatement. The app does not compile if I remove them.So in the end it’s not really helpful for now with all those
delete statement X of Ybecause I don’t know what that is. It could be really helpful to have a report file with patches so we can see what was the mutation, reproduce it, write a test to invalidate.I’m trying to see if the html report has this, but I can’t find a file to generate actual mutations. I set a “limit 30” but it only generates “invalid mutations”. I’ll try to re-run the full output (still with aggressive though) later.
But it was already helpful in some way, so far I know that I have to test a
@derive {Inspect, ...statement that is not tested at all.So I believe this is promising but you need a way to make prioritize the mutations in some way.
mudasobwa
Yes. And this is unavoidable. We (@bglusman and myself) put a lot of effort to the sophisticated optimization, but Elixir is still a compiled language.
That’s exactly what’s planned next.
Absolutely! Thanks for helping to test it!