Spock
hitchstory
Spock | hitchstory | |
---|---|---|
11 | 23 | |
3,489 | 84 | |
0.1% | - | |
9.4 | 9.1 | |
8 days ago | 16 days ago | |
Java | Python | |
Apache License 2.0 | GNU General Public License v3.0 or later |
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.
Spock
-
Mastering Spring Cloud Gateway Testing: Predicates (part 1)
I love using the Spock framework for its simplicity, readability, and maintainability. That's why we use Spock to drive our integration tests.
-
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
[1]: https://spockframework.org/
- 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.
hitchstory
- Hitchstory – Type-safe StrictYAML Python integration testing framework
-
Winner of the SF Mistral AI Hackathon: Automated Test Driven Prompting
I built something like this too:
https://github.com/hitchdev/hitchstory/blob/master/examples%...
- Prompt Engineering Testing Framework
-
Non-code contributions are the secret to open source success
I took the same approach to "docs are tests and tests are docs" with integration testing when I created this library: https://github.com/hitchdev/hitchstory
I realized at some point that a test and a how-to guide can and should actually be the same thing - not just for doctests, but for every kind of test.
It's not only 2x quicker to combine writing a test with writing docs, the test part and the docs part reinforce each other:
* Tests are more easily understandable when you attach written context intended for human consumption.
* Docs are better if they come attached to a guarantee that they're valid, not out of date and not missing crucial details.
* TDD is better if how-to docs are created as a side effect.
-
Ask HN: Are there any LLM projects for creating integration tests?
I have created a project for easily writing this type of test with YAML:
https://github.com/hitchdev/hitchstory
I dont think that this type of task is really appropriate for an LLM though. It is better to use hard abstractions for the truly deterministic stuff and for other stuff where you may need to do subtle trade offs (e.g. choosing a selector for the search bar) an LLM will generally do a bad job.
-
Should you add screenshots to documentation?
For those interested in the concept of having permanently up-to-date documentation with screenshots I built this testing framework based upon the idea that good documentation can be a autogenerated artefact of good tests:
https://github.com/hitchdev/hitchstory
-
How to add documentation to your product life cycle
I don't like gherkin. It's it has very awkward syntax, it's not type safe, it's very verbose, it has no ability to abstract scenarios and rather than being a source for generating the documentation it tries to be the documentation.
Nonetheless, there is a small number of projects where they either work around this or it doesn't matter as much. I find that most people that apply gherkin to their projects find it doesn't work - usually for one of the above reasons.
I built https://github.com/hitchdev/hitchstory as an alternative that has straightforward syntax (YAML), very strict type safety (StrictYAML), low verbosity, and is explicitly designed as a source for generating documentation rather than trying to be the documentation.
-
Beyond OpenAPI
I built this because I had the same idea: https://github.com/hitchdev/hitchstory
If the specification can be tested and used to generate docs and can be rewritten based upon program output then the maintenance cost for producing docs like these plunges.
-
Optimizing Postgres's Autovacuum for High-Churn Tables
-c fsync=off -c synchronous_commit=off -c full_page_writes=off
I got the answer from Karen Jex at Djangocon 2023.
I used it to build some integration tests which exhibit best practices: https://github.com/hitchdev/hitchstory/tree/master/examples/...
I considered using tmpfs but I wanted to cache the entire database volume and couldnt figure out how to do that with podman.
-
Elixir Livebook is a secret weapon for documentation
This is incredible work.
To anyone curious, I highly recommend:
- https://hitchdev.com/hitchstory/approach/
- https://hitchdev.com/hitchstory/why-not/
From the overall RDD/BDD type home page:
- https://hitchdev.com/hitchstory/
The entire product site is a thing of richly informative beauty.
---
My only question was whether the generated 'docs' snippets would add value over just reading the story in your DASL. Any markdown site generator (such as the chosen Material for MKDocs) can just embed the ```yaml anyway. But then I realized what was generating e.g. …
- https://hitchdev.com/hitchstory/using/engine/rewrite-story/
… and how superior that is to typical docs, especially typical docstring or swagger factories.
What are some alternatives?
Cucumber - Cucumber for the JVM
bumblebee - Pre-trained Neural Network models in Axon (+ 🤗 Models integration)
REST Assured - Java DSL for easy testing of REST services
testy - test helpers for more meaningful, readable, and fluent tests
AssertJ - AssertJ is a library providing easy to use rich typed assertions
ospec - Noiseless testing framework
Awaitility - Awaitility is a small Java DSL for synchronizing asynchronous operations
jsverify - Write powerful and concise tests. Property-based testing for JavaScript. Like QuickCheck.
Mockito - Most popular Mocking framework for unit tests written in Java
examples - Tests that rewrite themselves. Tests that rewrite your docs.
ArchUnit - A Java architecture test library, to specify and assert architecture rules in plain Java
explorer - Series (one-dimensional) and dataframes (two-dimensional) for fast and elegant data exploration in Elixir