junit-quickcheck
ddtj
junit-quickcheck | ddtj | |
---|---|---|
5 | 7 | |
952 | 5 | |
- | - | |
7.3 | 0.0 | |
9 days ago | over 2 years ago | |
Java | Java | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
junit-quickcheck
-
Need your feedback on a tool that auto-generates unit tests for java code
For anyone interested, there's also https://github.com/pholser/junit-quickcheck . Haven't used it myself but looks like an interesting library to explore. It's based on QuickCheck as well AFAIK.
-
Coding Challenge
Thank you for the insightful reply. I did struggle to convert the original algorithm I wrote (with while loops / continue / break) to a more functional style using unfold, and also faced an issue with the type signatures when I tried to break down the contents of Stream.unfoldRight to multiple functions, which is reflected to the messy state you mentioned. Regarding property based testing, I used junit-quickcheck and the "symmetry" property check was one I meant to write but wasn't quite sure how to create a generator for it. I created an issue to track my attempt to incorporate your suggestions in case you are interested in following this. Thanks again!
-
Does anyone have any advice for writing better Java tests.
A quick Google search shows that java has a library for this (here) but I've never used it in java so can't attest to it.
-
GitHub Copilot for JetBrains and Neovim
QuickcCheck-type tools (generators for tests that know about the edge cases of a domain - e. g. for the domain of numbers considering things like 0, the infinities, various almost-and-just-over powers of two, NaN and mantissas for floats, etc.):
* QuickCheck: https://hackage.haskell.org/package/QuickCheck
* Hypothesis: https://hypothesis.readthedocs.io/en/latest/
* JUnit QuickCheck: https://github.com/pholser/junit-quickcheck
Fuzz testing tools (tools which mutate the inputs to a program in order to find interesting / failing states in that program). Generally paired with code coverage:
* American Fuzzy Lop (AFL): https://github.com/google/AFL
* JQF: https://github.com/rohanpadhye/JQF
Mutation / Fault based test tools (review your existing unit coverage and try to introduce changes to your _production_ code that none of your tests catch)
* PITest: https://pitest.org/
-
Fuzzing Java in OSS-Fuzz
If you want an easy way to have better mutation coverage, check out property based testing. Eg junit-quickcheck for Java.
https://github.com/pholser/junit-quickcheck
ddtj
-
Need your feedback on a tool that auto-generates unit tests for java code
Very cool. I started working on something similar but never got very far with it. Too busy with other things. I also felt the performance was too problematic. I was also "too eager" to mock which is bad. If you get it right I think it can be huge. Good luck!
-
Remote Debugging on the Last Day of - Building DDTJ Day 10
I suggest watching the ddtj project to see when it gets updated with a new PR. You can also follow me on twitter to keep up to date with the latest developments. I have some great ideas for the core technology of DDT that go well beyond testing alone. There’s a lot of untapped potential here that we need to explore.
-
First Mocked Unit Test Generated by DDTJ - Building DDTJ Day 9
But I’m running a bit ahead. Let’s talk about what’s happening with the code right now… Or at least in the current PR that’s still waiting for more test coverage.
-
60x Performance Improvement & Moving on fullstack - Building DDTJ Day 7
With that I merged two PRs. This monster PR finally implements all the debugging logic so we can collect all the data we need. Then I merged a small fix which gave the performance boost I’ll discuss shortly.
-
Good News and Bad News, Pivot and Turn - Building DDTJ Day 6
Last week I spent 5 days building and designing the DDTJ project. Hopefully, I’ll complete the MVP by this weekend. As we left the series last week, I was stuck. This week there’s a bit of an improvement…
-
Code Coverage, Java Debugger API and Full Integration in Building DDJT - Day 3
We almost have an open source project. Well, technically we already have the source code and a few lines of code, but it still isn't exactly a "project". Not in the sense of "it needs to do something useful". But it compiles, runs unit tests and even has 80% code coverage. That last one was painful. I'm not a fan of arbitrary metrics to qualify the quality of code. The 80% code coverage is a good example of this. Case in point, this code. Currently, the source code looks like this:
-
Open Source Software Product Development, Building DDTJ - Day 1
I finished the first draft of the developer guide for DDTJ today. You can check it out here.
What are some alternatives?
jqwik - Property-Based Testing on the JUnit Platform
picocli - Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
jazzer - Coverage-guided, in-process fuzzing for the JVM
copilot.vim - Neovim plugin for GitHub Copilot
JQF - JQF + Zest: Coverage-guided semantic fuzzing for Java.
copilot-docs - Documentation for GitHub Copilot
libfuzzer-workshop - Repository for materials of "Modern fuzzing of C/C++ Projects" workshop.
PIT - State of the art mutation testing system for the JVM
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
American Fuzzy Lop - american fuzzy lop - a security-oriented fuzzer
fp-learning - A repository to solve common code challenges using FP