Random fake data generator written in go

alt text

Gofakeit Go Report Card Test codecov.io GoDoc license

Random data generator written in go

Buy Me A Coffee

Features

Installation

go get github.com/brianvoe/gofakeit/v6

Simple Usage

import "github.com/brianvoe/gofakeit/v6"

gofakeit.Seed(0)

gofakeit.Name()             // Markus Moen
gofakeit.Email()            // [email protected]
gofakeit.Phone()            // (570)245-7485
gofakeit.BS()               // front-end
gofakeit.BeerName()         // Duvel
gofakeit.Color()            // MediumOrchid
gofakeit.Company()          // Moen, Pagac and Wuckert
gofakeit.CreditCardNumber() // 4287271570245748
gofakeit.HackerPhrase()     // Connecting the array won't do anything, we need to generate the haptic COM driver!
gofakeit.JobTitle()         // Director
gofakeit.CurrencyShort()    // USD
// See full list below

Concurrent Struct

If you need to have independent randomization for the purposes of concurrency

import "github.com/brianvoe/gofakeit/v6"

faker := New(0) // or NewCrypto() to use crypto/rand

faker.Name()             // Markus Moen
faker.Email()            // [email protected]
faker.Phone()            // (570)245-7485
faker.BS()               // front-end
faker.BeerName()         // Duvel
faker.Color()            // MediumOrchid
faker.Company()          // Moen, Pagac and Wuckert
faker.CreditCardNumber() // 4287271570245748
faker.HackerPhrase()     // Connecting the array won't do anything, we need to generate the haptic COM driver!
faker.JobTitle()         // Director
faker.CurrencyShort()    // USD
// See full list below

Global Rand Set

If you would like to use the simple function call but need to use something like crypto/rand you can override the default global with the type you want

import "github.com/brianvoe/gofakeit/v6"

faker := NewCrypto()
SetGlobalFaker(faker)

Struct

import "github.com/brianvoe/gofakeit/v6"

// Create structs with random injected data
type Foo struct {
	Bar      string
	Int      int
	Pointer  *int
	Name     string    `fake:"{firstname}"`         // Any available function all lowercase
	Sentence string    `fake:"{sentence:3}"`        // Can call with parameters
	RandStr  string    `fake:"{randomstring:[hello,world]}"`
	Number   string    `fake:"{number:1,10}"`       // Comma separated for multiple values
	Regex    string    `fake:"{regex:[abcdef]{5}}"` // Generate string from regex
	Skip     *string   `fake:"skip"`                // Set to "skip" to not generate data for
	Created  time.Time								// Can take in a fake tag as well as a format tag
	CreatedFormat  time.Time `fake:"{year}-{month}-{day}" format:"2006-01-02"`
}

type FooBar struct {
	Bars    []string `fake:"{name}"`              // Array of random size (1-10) with fake function applied
	Foos    []Foo    `fakesize:"3"`               // Array of size specified with faked struct
	FooBars []Foo    `fake:"{name}" fakesize:"3"` // Array of size 3 with fake function applied
}

// Pass your struct as a pointer
var f Foo
gofakeit.Struct(&f)
fmt.Println(f.Bar)      		// hrukpttuezptneuvunh
fmt.Println(f.Int)      		// -7825289004089916589
fmt.Println(*f.Pointer) 		// -343806609094473732
fmt.Println(f.Name)     		// fred
fmt.Println(f.Sentence) 		// Record river mind.
fmt.Println(f.RandStr)  		// world
fmt.Println(f.Number)   		// 4
fmt.Println(f.Regex)    		// cbdfc
fmt.Println(f.Skip)     		// <nil>
fmt.Println(f.Created.String()) // 1908-12-07 04:14:25.685339029 +0000 UTC

var fb FooBar
gofakeit.Struct(&fb)
fmt.Println(fb.Bars)      // [Charlie Senger]
fmt.Println(fb.Foos)      // [{blmfxy -2585154718894894116 0xc000317bc0 Emmy Attitude demand addition. hello 3 <nil>} {cplbf -1722374676852125164 0xc000317cb0 Viva Addition option link. hello 7 <nil>}]

// Supported formats - Array and pointers as well
// int, int8, int16, int32, int64,
// float32, float64,
// bool, string,
// time.Time // If setting time you can also set a format tag
// Nested Struct Fields and Embeded Fields

Custom Functions

// Simple
AddFuncLookup("friendname", Info{
	Category:    "custom",
	Description: "Random friend name",
	Example:     "bill",
	Output:      "string",
	Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
		return RandomString([]string{"bill", "bob", "sally"}), nil
	},
})

// With Params
AddFuncLookup("jumbleword", Info{
	Category:    "jumbleword",
	Description: "Take a word and jumple it up",
	Example:     "loredlowlh",
	Output:      "string",
	Params: []Param{
		{Field: "word", Type: "int", Description: "Word you want to jumble"},
	},
	Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
		word, err := info.GetString(m, "word")
		if err != nil {
			return nil, err
		}

		split := strings.Split(word, "")
		ShuffleStrings(split)
		return strings.Join(split, ""), nil
	},
})

type Foo struct {
	FriendName string `fake:"{friendname}"`
	JumbleWord string `fake:"{jumbleword:helloworld}"`
}

var f Foo
Struct(&f)
fmt.Printf("%s", f.FriendName) // bill
fmt.Printf("%s", f.JumbleWord) // loredlowlh

Functions

All functions also exist as methods on the Faker struct

File

JSON(jo *JSONOptions) ([]byte, error)
XML(xo *XMLOptions) ([]byte, error)
FileExtension() string
FileMimeType() string

Person

Person() *PersonInfo
Name() string
NamePrefix() string
NameSuffix() string
FirstName() string
LastName() string
Gender() string
SSN() string
Contact() *ContactInfo
Email() string
Phone() string
PhoneFormatted() string
Teams(peopleArray []string, teamsArray []string) map[string][]string

Generate

Struct(v interface{})
Slice(v interface{})
Map() map[string]interface{}
Generate(value string) string
Regex(value string) string

Auth

Username() string
Password(lower bool, upper bool, numeric bool, special bool, space bool, num int) string

Address

Address() *AddressInfo
City() string
Country() string
CountryAbr() string
State() string
StateAbr() string
Street() string
StreetName() string
StreetNumber() string
StreetPrefix() string
StreetSuffix() string
Zip() string
Latitude() float64
LatitudeInRange(min, max float64) (float64, error)
Longitude() float64
LongitudeInRange(min, max float64) (float64, error)

Game

Gamertag() string

Beer

BeerAlcohol() string
BeerBlg() string
BeerHop() string
BeerIbu() string
BeerMalt() string
BeerName() string
BeerStyle() string
BeerYeast() string

Car

Car() *CarInfo
CarMaker() string
CarModel() string
CarType() string
CarFuelType() string
CarTransmissionType() string

Words

Noun() string
Verb() string
Adverb() string
Preposition() string
Adjective() string
Word() string
Sentence(wordCount int) string
Paragraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string
LoremIpsumWord() string
LoremIpsumSentence(wordCount int) string
LoremIpsumParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string
Question() string
Quote() string
Phrase() string

Foods

Fruit() string
Vegetable() string
Breakfast() string
Lunch() string
Dinner() string
Snack() string
Dessert() string

Misc

Bool() bool
UUID() string
FlipACoin() string
ShuffleAnySlice(v interface{})

Colors

Color() string
HexColor() string
RGBColor() []int
SafeColor() string

Internet

URL() string
DomainName() string
DomainSuffix() string
IPv4Address() string
IPv6Address() string
MacAddress() string
HTTPStatusCode() string
HTTPStatusCodeSimple() int
LogLevel(logType string) string
HTTPMethod() string
UserAgent() string
ChromeUserAgent() string
FirefoxUserAgent() string
OperaUserAgent() string
SafariUserAgent() string

Date/Time

Date() time.Time
DateRange(start, end time.Time) time.Time
NanoSecond() int
Second() int
Minute() int
Hour() int
Month() string
Day() int
WeekDay() string
Year() int
TimeZone() string
TimeZoneAbv() string
TimeZoneFull() string
TimeZoneOffset() float32
TimeZoneRegion() string

Payment

Price(min, max float64) float64
CreditCard() *CreditCardInfo
CreditCardCvv() string
CreditCardExp() string
CreditCardNumber(*CreditCardOptions) string
CreditCardType() string
Currency() *CurrencyInfo
CurrencyLong() string
CurrencyShort() string
AchRouting() string
AchAccount() string
BitcoinAddress() string
BitcoinPrivateKey() string

Company

BS() string
BuzzWord() string
Company() string
CompanySuffix() string
Job() *JobInfo
JobDescriptor() string
JobLevel() string
JobTitle() string

Hacker

HackerAbbreviation() string
HackerAdjective() string
Hackeringverb() string
HackerNoun() string
HackerPhrase() string
HackerVerb() string

Hipster

HipsterWord() string
HipsterSentence(wordCount int) string
HipsterParagraph(paragraphCount int, sentenceCount int, wordCount int, separator string) string

App

AppName() string
AppVersion() string
AppAuthor() string

Animal

PetName() string
Animal() string
AnimalType() string
FarmAnimal() string
Cat() string
Dog() string

Emoji

Emoji() string
EmojiDescription() string
EmojiCategory() string
EmojiAlias() string
EmojiTag() string

Language

Language() string
LanguageAbbreviation() string
ProgrammingLanguage() string
ProgrammingLanguageBest() string

Number

Number(min int, max int) int
Int8() int8
Int16() int16
Int32() int32
Int64() int64
Uint8() uint8
Uint16() uint16
Uint32() uint32
Uint64() uint64
Float32() float32
Float32Range(min, max float32) float32
Float64() float64
Float64Range(min, max float64) float64
ShuffleInts(a []int)
RandomInt(i []int) int

String

Digit() string
DigitN(n uint) string
Letter() string
LetterN(n uint) string
Lexify(str string) string
Numerify(str string) string
ShuffleStrings(a []string)
RandomString(a []string) string
Owner
Brian Voelker
Senior Full Stack Developer. Love working with golang and building front end applications.
Brian Voelker
Comments
  • Concurrency

    Concurrency

    Hello, nice job on the package, it looks neat and has a good documentation.

    I have 2 main issues:

    1. is not concurrent safe, it uses rand.* global version
    2. I need one instance for each thread, and all the functions are public.

    The refactoring will be big and I don't see a way to make it backward compatible, to make all the functions as methods and using a custom private random generator.

    Any ideas?

  • Small tweaks, tests, fixes and optimizations

    Small tweaks, tests, fixes and optimizations

    Added seed to some benchmarks, so they can be compared. Small refactor and optimization (+10%) of ReplaceWith* functions Added Digit() function Fixed RandString panic when input is empty Optimized ShuffleStrings (20%) Fixed getRandValue, intDataCheck and dataCheck panic when input is empty

  • Ability to create Faker instance with local rand

    Ability to create Faker instance with local rand

    This is an example change of what it could like to support a Faker client instance, that does not rely on or seed global rand.

    Similar to https://github.com/brianvoe/gofakeit/issues/78.

    This would give users greater, and potentially simpler, control over how to create fake data and without affecting global state.

    I only made a change to a single function for demonstration purposes to start the conversation. Each function would be slightly different, but the idea to avoid breaking changes and keep maintenance simple would be move existing functionality to private functions, and the new receiver methods could call with their rand instance.

    I could further work on this if the change is welcome, and I'm open to other suggestions on implementation strategy.

  • go get github.com/brianvoe/gofakeit/v5 giving error

    go get github.com/brianvoe/gofakeit/v5 giving error

    Error: cannot find package "github.com/brianvoe/gofakeit/v5"

    Go get github.com/brianvoe/gofakeit is pulling the code. But throwing error :

    goserver1 % go get github.com/brianvoe/gofakeit

    internal/race

    compile: version "go1.14" does not match go tool version "go1.14.2"

    unicode/utf8

    compile: version "go1.14" does not match go tool version "go1.14.2"

    runtime/internal/sys

    compile: version "go1.14" does not match go tool version "go1.14.2"

    math/bits

    compile: version "go1.14" does not match go tool version "go1.14.2"

    unicode

    compile: version "go1.14" does not match go tool version "go1.14.2"

    encoding

    compile: version "go1.14" does not match go tool version "go1.14.2"

    unicode/utf16

    compile: version "go1.14" does not match go tool version "go1.14.2"

    image/color

    compile: version "go1.14" does not match go tool version "go1.14.2"

    github.com/brianvoe/gofakeit/data

    compile: version "go1.14" does not match go tool version "go1.14.2"

    sync/atomic

    compile: version "go1.14" does not match go tool version "go1.14.2"

    internal/cpu

    compile: version "go1.14" does not match go tool version "go1.14.2"

    runtime/internal/atomic

    compile: version "go1.14" does not match go tool version "go1.14.2"

  • Add gofakeit command

    Add gofakeit command

    The motivation for this was using jsonify which allows to quickly produce JSON using CLI.

    The thing with jsonify is that it does not support generating fake data, and that's good, one tool should do one thing.

    gofakeit is awesome lib but the fact that you can't use it from a CLI is a bummer, hence, I decided to propose this PR. I haven't found and previous attempts to do this.

    The main goals were simplicity and easy to maintenance. The exposed commands are generated using go generate tool. When a new function is added, it's enough to execute go generate ./cmd/gofakeit/... in the project root directory to update the list of available commands.

    The current limitation is that it supports only functions that take no params and return a single value of type string. The codebase can be extended to support this, it's not a blocker.

  •  feat: add Struct() to randomize a struct

    feat: add Struct() to randomize a struct

    Lots of details are missing but this should give an idea of what I've in mind.

    I'm going to implement all basic type.

    An important addition that could come in will be range for all data types

    struct Foo{
      Bar int `fake:"{Number|42|50}" // will fill 42 <= Bar <= 50
    }
    
  • Date struct annotation not working

    Date struct annotation not working

    Test struct {
            CreatedAt   time.Time `json:"created_at" fake:"{date}"`
        }
    

    This always ends up with "created_at":"0001-01-01T00:00:00Z"

    Is that a bug?

  • What is the correct usage for generating a string from a regular expression using a struct tag?

    What is the correct usage for generating a string from a regular expression using a struct tag?

    Hi,

    Started using this library and like the feature for generating strings according to a regular expression! I am trying to use this to create random strings that satisfy a specific format and/or for a specific length.

    I have managed to generate a string from a regular expression using gofakeit.Regex function. However, I cannot seem to managed the same functionality using a struct tag.

    What is the correct usage for generating a string from a regular expression using a struct tag?

    I have created a small example listing below that illustrates my attempt at this. This is also available at the following go playground.

    package main
    
    import (
    	"fmt"
    	"github.com/brianvoe/gofakeit/v6"
    )
    
    type Foo struct {
    	RegExpStr  string  `fake:"{regex:^[0-9]{0,16}$}"`
    }
    
    
    func main() {
    	var f Foo
    	gofakeit.Struct(&f)
    	
    	fmt.Println("Try and generate a random string of digits upto length 16 using regex")
    	fmt.Println()
    	fmt.Println()
    	fmt.Println("RegExpStr Via Tag := ", f.RegExpStr)
    	
    	result := gofakeit.Regex(`^[0-9]{0,16}$`)
    	fmt.Println("RegExp Via Function := ", result)
    }
    
  • fuzz Regex

    fuzz Regex

    Saw issue #219 and thought to get a go at it. Regex was a good target for fuzz and a cool feature I'm looking forward to using.

    It found 3 classes of bugs so far:

    • ^ or $ at unexpected places. No legal output is possible so special errors need to be returned.
    • \b and \A, perhaps more? Maybe unimplemented?
    • A capture group followed by a large repeat might run out of memory.

    If Regex is only expected to take trusted input, then not all bugs found by fuzz are worth fixing, just filtering out the "bugs" at the start of fuzz is good enough. Perhaps it needs a check regex function that is more strict than regexp.Compile?

  • Fakeit client instead of global/package vars/seed

    Fakeit client instead of global/package vars/seed

    I'd like be able to create a "fakeit" client object that could be instantiated

    Example usage:

    // parameter is the seed
    f := gofakeit.New(0)
    f.Name()
    

    It is safe/expected to call gofakeit.Seed(?) many times? What happens?

  • 6.17.0 broke structs with field of

    6.17.0 broke structs with field of "custom" type

    What: Panic during runtime What version: 6.17.0 and 6.18.0 Last good version: 6.16.0 Go version: 1.19

    Considering this piece of code:

    package main
    
    import (
    	"fmt"
    
    	"github.com/brianvoe/gofakeit/v6"
    )
    
    type SomeArray []string
    
    type SomeStruct struct {
    	Field SomeArray `fake:"{countryabr}"`
    }
    
    func main() {
    	s := SomeStruct{}
    	gofakeit.Struct(&s)
    	fmt.Println(s)
    }
    

    This used to work fine in 6.16.0 but does not work anymore in 6.17.0 and 6.18.0.

    In the latter two, the code above results in this panic:

    panic: reflect.Set: value of type string is not assignable to type main.SomeArray
    
    goroutine 1 [running]:
    reflect.Value.assignTo({0x54fe80?, 0xc00009e480?, 0xc0001cd878?}, {0x58bdef, 0xb}, 0x554880, 0x0)
    	/usr/local/go-faketime/src/reflect/value.go:3145 +0x2a5
    reflect.Value.Set({0x554880?, 0xc0000aa0c0?, 0x0?}, {0x54fe80?, 0xc00009e480?, 0x0?})
    	/usr/local/go-faketime/src/reflect/value.go:2160 +0xeb
    github.com/brianvoe/gofakeit/v6.rCustom(0x10?, {0x71e820?, 0xc0000b8110?}, {0x554880?, 0xc0000aa0c0?, 0x4714d4?}, {0x5495b8?, 0xe?})
    	/tmp/gopath2537032829/pkg/mod/github.com/brianvoe/gofakeit/[email protected]/struct.go:83 +0x307
    github.com/brianvoe/gofakeit/v6.rSlice(0xc0001cdb38?, {0x5eaf60, 0x554880}, {0x554880?, 0xc0000aa0c0?, 0xc0001cdb80?}, {0x5495b8, 0xc}, 0xffffffffffffffff)
    	/tmp/gopath2537032829/pkg/mod/github.com/brianvoe/gofakeit/[email protected]/struct.go:171 +0x10c
    github.com/brianvoe/gofakeit/v6.r(0x5495b2?, {0x5eaf60, 0x554880}, {0x554880?, 0xc0000aa0c0?, 0x554880?}, {0x5495b8, 0xc}, 0x0?)
    	/tmp/gopath2537032829/pkg/mod/github.com/brianvoe/gofakeit/[email protected]/struct.go:47 +0x24f
    github.com/brianvoe/gofakeit/v6.rStruct(0x524d9e?, {0x5eaf60, 0x55c340}, {0x55c340?, 0xc0000aa0c0?, 0x7029c0?}, {0x0, 0x0})
    	/tmp/gopath2537032829/pkg/mod/github.com/brianvoe/gofakeit/[email protected]/struct.go:134 +0x356
    github.com/brianvoe/gofakeit/v6.r(0x54c240?, {0x5eaf60, 0x55c340}, {0x55c340?, 0xc0000aa0c0?, 0x7f73bc404a00?}, {0x0, 0x0}, 0x7f73e3a493a0?)
    	/tmp/gopath2537032829/pkg/mod/github.com/brianvoe/gofakeit/[email protected]/struct.go:35 +0x2c8
    github.com/brianvoe/gofakeit/v6.rPointer(0x7f73bc7b0998?, {0x5eaf60?, 0x54c240?}, {0x54c240?, 0xc0000aa0c0?, 0x4435f1?}, {0x0, 0x0}, 0xc0000406a0?)
    	/tmp/gopath2537032829/pkg/mod/github.com/brianvoe/gofakeit/[email protected]/struct.go:154 +0x17a
    github.com/brianvoe/gofakeit/v6.r(0x7f73bc7b05e0?, {0x5eaf60, 0x54c240}, {0x54c240?, 0xc0000aa0c0?, 0xc0000aa0c0?}, {0x0, 0x0}, 0xc0001cdf08?)
    	/tmp/gopath2537032829/pkg/mod/github.com/brianvoe/gofakeit/[email protected]/struct.go:33 +0x207
    github.com/brianvoe/gofakeit/v6.structFunc(0xc000094000?, {0x54c240?, 0xc0000aa0c0?})
    	/tmp/gopath2537032829/pkg/mod/github.com/brianvoe/gofakeit/[email protected]/struct.go:27 +0xde
    github.com/brianvoe/gofakeit/v6.Struct(...)
    	/tmp/gopath2537032829/pkg/mod/github.com/brianvoe/gofakeit/[email protected]/struct.go:17
    main.main()
    	/tmp/sandbox2580599956/prog.go:19 +0x51
    
    Program exited.
    

    I believe it's this commit: https://github.com/brianvoe/gofakeit/commit/e7010c55e5da95923828d91556c801b31de4de95

  • Custom function for time attributes

    Custom function for time attributes

    Hello!

    I'm trying to create a custom function to init some attributes with time.Now(), here's what I'm trying:

    package main
    
    import (
    	"fmt"
    	"math/rand"
    	"time"
    
    	"github.com/brianvoe/gofakeit/v6"
    )
    
    func init() {
    	gofakeit.AddFuncLookup("timenow", gofakeit.Info{
    		Category:    "custom",
    		Description: "Set the time to time.Now()",
    		Output:      "time.Time",
    		Generate: func(r *rand.Rand, m *gofakeit.MapParams, info *gofakeit.Info) (interface{}, error) {
    			return time.Now(), nil
    		},
    	})
    }
    
    type Foo struct {
    	Now time.Time `fake:"{timenow}"`
    }
    
    func main() {
    	var foo Foo
    	gofakeit.Struct(&foo)
    	fmt.Println(foo.Now)
    }
    

    However, the value it prints on execution is always 0001-01-01 00:00:00 +0000 UTC. I am doing something wrong? Is there another way of achieving what I'm trying to do? Here's also the Go Playground code for easier testing.

    Thanks in advance and great job with this library!

  • daterange Implicit requirements

    daterange Implicit requirements

    no document, daterange(start,end,format) get expected result requirements:

    • contain format tag
    • daterange param format same with tag 'format'

    no format

    package main
    
    import (
    	"log"
    	"time"
    
    	"github.com/brianvoe/gofakeit/v6"
    )
    
    type T struct {
    	Time time.Time `json:"time" fake:"{daterange:2021-01-16,2022-05-05,yyyy-MM-dd}"`
    }
    
    func main() {
    	var tmp T
    	gofakeit.Struct(&tmp)
    	log.Println(tmp)
    }
    
    $ go run main.go
    2022/10/16 10:00:00 {0001-01-01 00:00:00 +0000 UTC}
    

    add format

    package main
    
    import (
    	"log"
    	"time"
    
    	"github.com/brianvoe/gofakeit/v6"
    )
    
    type T struct {
    	Time time.Time `json:"time" fake:"{daterange:2021-01-16,2022-05-05,yyyy-MM-dd}" format:"2006-01-02"`
    }
    
    func main() {
    	var tmp T
    	gofakeit.Struct(&tmp)
    	log.Println(tmp)
    }
    
    $ go run main.go
    2022/10/16 10:00:00 {2021-02-24 00:00:00 +0000 UTC}
    
Random is a package written in Go that implements pseudo-random number generators for various distributions.

Random This package implements pseudo-random number generators for various distributions. For integers, there is a function for random selection from

Jul 11, 2022
Random - A Golang library that provides functions for generating random values

Random A Golang library that provides functions for generating random values. Us

Dec 15, 2022
A library for generating fake data such as names, addresses, and phone numbers.

faker Faker is a library for generating fake data such as names, addresses, and phone numbers. It is a (mostly) API-compatible port of Ruby Faker gem

Jan 4, 2023
This is a simple test application that sends fake video data from one pion instance to another

Pion test app for BWE This is a simple test application that sends fake video data from one pion instance to another. It is a modified version of the

Jun 8, 2022
A simple tool to fill random data into a file to overwrite the free space on a disk

random-fill random-fill is a simple tool to fill random data into a file to over

Oct 2, 2022
Choose random items from a list

Random Choose a set of random items from a list Usage If a list of playing card names are stored in a file cards.txt, choose 5 at ramdom ./choose_item

Nov 26, 2021
HTTP load generator, ApacheBench (ab) replacement, formerly known as rakyll/boom
HTTP load generator, ApacheBench (ab) replacement, formerly known as rakyll/boom

hey is a tiny program that sends some load to a web application. hey was originally called boom and was influenced from Tarek Ziade's tool at tarekzia

Dec 31, 2022
A presentable test report generator for go packages
A presentable test report generator for go packages

go-tprof Overview Prerequisites 1. Go version >= 1.12 2. Node.js version >= 8.0.0 (for building the UI) 3. Yarn 4. GOPATH and local bin setup (`expor

Dec 16, 2022
A workload generator for MySQL compatible databases

Diligent is a tool we created at Flipkart for generating workloads for our SQL databases that enables us to answer specific questions about the performance of a database.

Nov 9, 2022
Completely type-safe compile-time mock generator for Go

Mockc Mockc is a completely type-safe compile-time mock generator for Go. You can use it just by writing the mock generators with mockc.Implement() or

Aug 25, 2022
Load generator for measuring overhead generated by EDRs and other logging tools on Linux

Simple load generator for stress-testing EDR software The purpose of this tool is to measure CPU overhead incurred by having active or passive securit

Nov 9, 2022
Behaviour Driven Development tests generator for Golang
Behaviour Driven Development tests generator for Golang

gherkingen It's a Behaviour Driven Development (BDD) tests generator for Golang. It accept a *.feature Cucumber/Gherkin file and generates a test boil

Dec 16, 2022
Cloud Spanner load generator to load test your application and pre-warm the database before launch

GCSB GCSB Quickstart Create a test table Load data into table Run a load test Operations Load Single table load Multiple table load Loading into inter

Nov 30, 2022
bencode is a golang package for bencoding and bdecoding data from and from to equivalents.

Bencode bencode is a golang package for bencoding and bdecoding data from and from to equivalents. Bencode (pronounced like Ben-code) is the encoding

Jan 8, 2022
A go server which will respond with data to mock a server!

Mocker A go program which will respond with data to mock a server; mainly useful while developing a frontend application, whose backend is not running

Jan 5, 2023
A yaml data-driven testing format together with golang testing library

Specimen Yaml-based data-driven testing Specimen is a yaml data format for data-driven testing. This enforces separation between feature being tested

Nov 24, 2022
Testing API Handler written in Golang.

Gofight API Handler Testing for Golang Web framework. Support Framework Http Handler Golang package http provides HTTP client and server implementatio

Dec 16, 2022
Package cdp provides type-safe bindings for the Chrome DevTools Protocol (CDP), written in the Go programming language.

cdp Package cdp provides type-safe bindings for the Chrome DevTools Protocol (CDP), written in the Go programming language. The bindings are generated

Jan 7, 2023
Fast cross-platform HTTP benchmarking tool written in Go

bombardier bombardier is a HTTP(S) benchmarking tool. It is written in Go programming language and uses excellent fasthttp instead of Go's default htt

Dec 31, 2022