{"id":15397839,"url":"https://github.com/alexdenisov/fuzzer","last_synced_at":"2025-04-15T22:30:38.384Z","repository":{"id":56911780,"uuid":"53427722","full_name":"AlexDenisov/Fuzzer","owner":"AlexDenisov","description":"Do not crash when your server lies","archived":false,"fork":false,"pushed_at":"2018-08-16T12:19:34.000Z","size":99,"stargazers_count":68,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-12T05:47:55.931Z","etag":null,"topics":["fuzz-testing"],"latest_commit_sha":null,"homepage":"https://lowlevelbits.org/crash-free-code-with-fuzzer/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexDenisov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-08T16:32:59.000Z","updated_at":"2025-04-07T12:15:48.000Z","dependencies_parsed_at":"2022-08-21T04:20:37.383Z","dependency_job_id":null,"html_url":"https://github.com/AlexDenisov/Fuzzer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDenisov%2FFuzzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDenisov%2FFuzzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDenisov%2FFuzzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexDenisov%2FFuzzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexDenisov","download_url":"https://codeload.github.com/AlexDenisov/Fuzzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249165847,"owners_count":21223332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fuzz-testing"],"created_at":"2024-10-01T15:39:40.705Z","updated_at":"2025-04-15T22:30:38.133Z","avatar_url":"https://github.com/AlexDenisov.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![Cocoapods compatible](https://cocoapod-badges.herokuapp.com/v/Fuzzer/badge.png)](https://cocoapods.org/?q=fuzzer)\n\n# Fuzzer\n\n\u003e Do not crash when your server lies\n\n### What is that?\n\n\u003e We all know that the API has a specification. We all write tests to cover “happy paths” and to cover “unhappy paths” when work with the API.\n\n\u003e It may seem that we’re pretty safe if we have tests and follow the specification. Well, actually no. Usually it works well in theory, but doesn’t really work in practice.\n\n\u003e We can write as many tests as we need to cover all edge cases, but that is both time consuming and error prone. The best choice would be is to automate this process.\n\nfrom [Crash-free code with Fuzzer](https://tech.blacklane.com/2016/03/11/crash-free-code-with-fuzzer/)\n\n### Example\n\n```objectivec\n- (void)test {\n  NSDictionary *sample = @{\n    @“name” : @“John Doe”,\n    @“age” : @42\n  };\n\n  UserDeserializer *deserializer = [UserDeserializer new];\n\n  FZRRunner *runner = [FZRRunner runnerWithBuiltinMutationsForSample:sample];\n\n  NSArray *reports = [runner enumerateMutantsUsingBlock:^(NSDictionary *mutant) {\n    [deserializer deserializeUser:mutant];\n  }];\n\n  XCTAssertEqual(reports.count, 0);\n}\n```\n\n### Installation\n\n#### Components (used by maintainers)\n\nGet the latest [component .make file for Fuzzer](https://github.com/AlexDenisov/Components/tree/master/Components.make/Fuzzer).\n\n#### CocoaPods\n\n```ruby\npod 'Fuzzer', '0.3.2'\n```\n\n#### Carthage\n\nAdd the line below to your `Cartfile` to get the latest version of Fuzzer.\n\n```\ngithub \"AlexDenisov/Fuzzer\"\n```\n\nPlease consider [Carthage Documentation](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md) if you want to install a specific version of Fuzzer or make any advanced setup.\n\n```\nNote : Carthage support has been introduded in v0.3.1\nSo older versions of Fuzzer cannot be installed with Carthage.\n```\n\n\n#### Building From Source\n\nTypically, you won't have to do this. But if you do, a preferred approach for building from source is using [sub-projects](https://www.cocoanetics.com/2011/12/sub-projects-in-xcode/).\n\n\nYou can use either of the targets below depending on your needs:\n\n* `Fuzzer-lib-ios-static` - for legacy projects (up to `iOS 6`)\n* `Fuzzer-iOS-dynamic` - for swift and modern projects\n\n\n\n\n### Out of the box\n\n#### Builtin Mutations\n\n#### Delete Node Mutation\n\nRemoves random key/value pair from a dictionary\n\n#### Replace Node Mutation\n\nTakes random key from dictionary and replaces its value with a value provided by [Node Replacement](https://github.com/AlexDenisov/Fuzzer#builtin-replacements)\n\n#### Builtin Replacements\n\n  - integer replacement:    replaces value with 'random' integer\n  - float replacement:      replaces value with 'random' float\n  - string replacement:     replaces value with 'random' string\n  - boolean replacement:    replaces value with 'random' boolean\n  - array replacement:      replaces value with 'random' array\n  - dictionary replacement: replaces value with 'random' dictionary\n  - null replacement:       replaces value with `[NSNull null]`\n  - nil replacement:        replaces value with `nil` (leads to removing key/value from dictionary)\n\n### License\n\nMIT, see `LICENSE` for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdenisov%2Ffuzzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdenisov%2Ffuzzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdenisov%2Ffuzzer/lists"}