All Projects → naver → fixture-monkey

naver / fixture-monkey

Licence: Apache-2.0 License
Let Fixture Monkey generate test instances including edge cases automatically

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to fixture-monkey

Fsharp Hedgehog
Release with confidence, state-of-the-art property testing for .NET.
Stars: ✭ 219 (+23.73%)
Mutual labels:  test, property-based-testing
Haskell Hedgehog
Release with confidence, state-of-the-art property testing for Haskell.
Stars: ✭ 584 (+229.94%)
Mutual labels:  test, property-based-testing
level-test
Inject temporary and isolated level stores (leveldown, level-js, memdown or custom) into your tests.
Stars: ✭ 19 (-89.27%)
Mutual labels:  test
BDTest
BDTest - A Testing Framework for .NET
Stars: ✭ 58 (-67.23%)
Mutual labels:  test
jsf
Creates fake JSON files from a JSON schema
Stars: ✭ 46 (-74.01%)
Mutual labels:  property-based-testing
skywalking-infra-e2e
Apache SkyWalking Infra E2E
Stars: ✭ 30 (-83.05%)
Mutual labels:  test
runtypes-generate
Transform runtypes type to jsverify arbitrary for generate sample of data
Stars: ✭ 39 (-77.97%)
Mutual labels:  property-based-testing
travis-minikube
Run minikube on Travis CI
Stars: ✭ 89 (-49.72%)
Mutual labels:  test
bdd-for-c
A simple BDD library for the C language
Stars: ✭ 90 (-49.15%)
Mutual labels:  test
peeky
A fast and fun test runner for Vite & Node 🐈️ Powered by Vite ⚡️
Stars: ✭ 611 (+245.2%)
Mutual labels:  test
mesh
Решает тесты с МЭШ.
Stars: ✭ 19 (-89.27%)
Mutual labels:  test
HTTP-Connectivity-Tester
Aids in discovering HTTP and HTTPS connectivity issues. #nsacyber
Stars: ✭ 79 (-55.37%)
Mutual labels:  test
RSS-Reader
Simple project with clean architecture
Stars: ✭ 31 (-82.49%)
Mutual labels:  test
react-native-ffmpeg-test
Test applications for react-native-ffmpeg. Not maintained anymore. Superseded by FFmpegKitTest.
Stars: ✭ 22 (-87.57%)
Mutual labels:  test
randstr
Golang secure random string
Stars: ✭ 64 (-63.84%)
Mutual labels:  random-generation
snabbkaffe
Collection of utilities for trace-based testing
Stars: ✭ 35 (-80.23%)
Mutual labels:  property-based-testing
edd
Erlang Declarative Debugger
Stars: ✭ 20 (-88.7%)
Mutual labels:  property-based-testing
stub-server
Stub server for REST APIs
Stars: ✭ 14 (-92.09%)
Mutual labels:  test
GitHubApplication
GitHubApplication 📱 is an Android application built to demonstrate the use of modern Android development tools - (Kotlin, Coroutines, Hilt, LiveData, View binding, Data Store, Architecture components, MVVM, Room, Retrofit, Navigation).
Stars: ✭ 11 (-93.79%)
Mutual labels:  test
teth
Testing and deployment framework for Ethereum smart contracts.
Stars: ✭ 31 (-82.49%)
Mutual labels:  test

Fixture Monkey

Maven version Build GitHub license

Designed by Judy Kim

"Write once, Test anywhere"

Fixture Monkey is designed to generate controllable arbitrary instances easily. It allows you to reuse same configurations of the instances in several tests.

You can write countless tests including edge cases by only one instance of the FixtureMonkey type. You can generate instances of complex types automatically and set fields with values from builders of the ArbitraryBuilder type. The well-defined builders could be reused in any tests. Writing integration tests is easier with Fixture Monkey.

Each primitive type property is generated by Jqwik

Example

@Data   // lombok getter, setter
public class Order {
    @NotNull
    private Long id;

    @NotBlank
    private String orderNo;

    @Size(min = 2, max = 10)
    private String productName;

    @Min(1)
    @Max(100)
    private int quantity;

    @Min(0)
    private long price;

    @Size(max = 3)
    private List<@NotBlank @Size(max = 10) String> items = new ArrayList<>();

    @PastOrPresent
    private Instant orderedAt;

    @Email
    private String sellerEmail;
}

@Test
void test() {
    // given
    FixtureMonkey sut = FixtureMonkey.create();

    // when
    Order actual = sut.giveMeOne(Order.class);

    // then
    then(actual.getId()).isNotNull();
}

Requirements

  • JDK 1.8 or higher
  • Jqwik 1.6.4

Install

Gradle

testImplementation("com.navercorp.fixturemonkey:fixture-monkey-starter:0.3.2")

Maven

<dependency>
    <groupId>com.navercorp.fixturemonkey</groupId>
    <artifactId>fixture-monkey-starter</artifactId>
    <version>0.3.2</version>
    <scope>test</scope>
</dependency>

Documentation

Third-party Modules

  • fixture-monkey-jackson
    • Supports jackson Serialize/Deserialize object generation.
  • fixture-monkey-kotlin
    • Supports Kotlin.
  • fixture-monkey-autoparams (Experimental)
    • Extends AutoParams to support parameterized tests.
  • fixture-monkey-mockito (Experimental)
    • Supports for generating interfaces and abstract classes as mockito objects.

Contributors

More about Fixture Monkey

Articles

Welcome to write articles about Fixture Monkey!

License

Copyright 2021-present NAVER Corp.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].