AssertJ
Spock
Our great sponsors
AssertJ | Spock | |
---|---|---|
14 | 10 | |
2,536 | 3,484 | |
0.8% | 0.2% | |
9.5 | 9.4 | |
4 days ago | 2 days ago | |
Java | Java | |
Apache License 2.0 | Apache License 2.0 |
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.
AssertJ
-
Announcing lets_expect - Clean tests in Rust.
Maybe not the feedback you want, but would you consider developing something that looks like plain old (and frankly beautiful) AssertJ?
-
7 Awesome Libraries for Java Unit & Integration Testing
AssertJ - fluent assertions
-
Any suggestions for good open source Java codebases to study(With below criteria)?
AssertJ https://github.com/assertj/assertj
- AssertJ: A fluent assertions Java library
-
Any resources for Unit Tests?
Truth or AssertJ for easier assertions in tests with better exceptions
-
Getting back into Java after 12-15 years away?
While we are at it: AssertJ is very powerful for writing assertions.
-
Imperative vs Declarative Programming
In OO you can make beautiful DSLs that allow really declarative use within that domain, e.g. test assertions in AssertJ, but everybody in the OO world is sensible enough to not try and claim OO as such being declarative. I guess they don't feel a need to try to prove the superiority of the paradigm.
-
Make your tests more readable using AssertJ and BDD syntax
AssertJ comes with a variety of assertions that can be chained together and are specific to the type of your "actual" variable.
-
How can I get rid of this warning? It's a warning for an "unchecked invocation".
At any rate it comes from a library called assertj.
-
Who here are using the Hamcrest API and why?
While Hamcrest add some fluentidity to unit tests ä, I prefer the fluent assertions of AssertJ.
Spock
-
Helidon Níma is the first Java microservices framework based on virtual threads
Well I care a lot that it exists. And many other people I know do as well. Just because you don't seem to like it, you shouldn't imagine everyone else is like you.
Maybe Grails is no longer used as much (like Rails itself), but Groovy found other usages since then, like https://spockframework.org/ and Jenkins pipelines (https://www.jenkins.io/doc/book/pipeline/syntax/). It's not going anywhere, and I see no reason for anyone to be upset about it.
-
Ask HN: What's your favorite software testing framework and why?
In my opinion it is Spock for Java/Groovy [1]. The amount of functionality and readability you can squeeze from Groovy's DSLesque is absurd. Is basically a full fledged new test language with Java sprinkled as the test contents code
- 7 Awesome Libraries for Java Unit & Integration Testing
- There is framework for everything.
-
Are there languages that allow to extend its syntax ?
Groovy allows you to perform transforms on it's AST. If you look at the Spock framework, they used AST transforms to pull off a lot of the DSL.
-
Using Cucumber and Spock for API test Automation — What Benefits Can You Expect?
Spock and Cucumber exemplify the philosophy of behavior-driven development (BDD). The principle behind BDD is that you must first define the desired result of the added feature in a subject-oriented language before writing any tests. The developers are then given the final documentation.
- A linguagem de programação Groovy - Radar da itexto
- Gradle 7.0 Released
-
HTTPS Client Certificate Authentication With Java
As a quick demonstration, the following (Spock) test asserts that the client JVM code fails to create an SSL connection with the service. Note that I chose to use Vert.x Web Client to handle interacting with the service, but don't let this decision distract from the core content of this post. Nevertheless, if you haven't used Vert.x, I encourage you to try it out -- especially for building server-side network applications.
-
Modern software controls dependencies because it helps software authors
I maintain a batterie of libraries for my company. Managing dependencies is one of the hardest part even with internal only libraries. Our major pain-point is the dependency towards 3rd party software and dealing with semver. Semver is not really hard to understand it’s just hard to execute as the developer is executing the rules. So for instance if I create a library/plugin etc which wraps around the a tool, would it be a breaking change when the software stops supporting a specific version of the wrapped tool even though the internal API stayed the same (this happens a lot for me with gradle plugins which suddenly decide to not being compatible with the version of gradle I use). I would say yes but for larger dependency trees this becomes a nightmare. For our internal unity3d libraries we decided to not count the supported Unity versions as part of the semver version. The other option would be to have special library packages for each version of unity similar to how the Spock testing framework[1] deals with groovy. For this option we don’t have enough engineers at my company.
What are some alternatives?
TestNG - TestNG testing framework
Cucumber - Cucumber for the JVM
Truth - Fluent assertions for Java and Android
REST Assured - Java DSL for easy testing of REST services
Hamcrest - Java (and original) version of Hamcrest
Awaitility - Awaitility is a small Java DSL for synchronizing asynchronous operations
Mockito - Most popular Mocking framework for unit tests written in Java
junit5 - ✅ The 5th major version of the programmer-friendly testing framework for Java and the JVM
ArchUnit - A Java architecture test library, to specify and assert architecture rules in plain Java
WireMock - A tool for mocking HTTP services