Skip to content

Instantly share code, notes, and snippets.

@CoditCompany
Last active August 31, 2018 11:54
Show Gist options
  • Select an option

  • Save CoditCompany/2a772d4f2e73a22dc3f5032ab08cb5d0 to your computer and use it in GitHub Desktop.

Select an option

Save CoditCompany/2a772d4f2e73a22dc3f5032ab08cb5d0 to your computer and use it in GitHub Desktop.
Automating URL Bogus Discovery
let stubQueryParams =
[ "category", Arb.generate<string>
"style", Arb.generate<string>
"size", Arb.generate<string> ]
|> Map.ofList
[<Property>]
let ``URL bogus query parameters doesn't alter HTTP status`` () =
stubQueryParams
|> FSec.urlBogus "http://example.com"
|> Arb.fromGen
|> Prop.forAll <| fun url ->
let { StatusCode = code } = Http.RequestString url
code = OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment