{"id":13535221,"url":"https://github.com/q231950/rorschach","last_synced_at":"2026-01-25T04:34:47.030Z","repository":{"id":43081425,"uuid":"249059473","full_name":"q231950/rorschach","owner":"q231950","description":"Write XCTests in BDD style 🤷🏻‍♂️","archived":false,"fork":false,"pushed_at":"2024-01-28T19:00:58.000Z","size":486,"stargazers_count":54,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T00:37:14.267Z","etag":null,"topics":["bdd","bdd-style","swift-function-builders","swift-result-builders","testing","uitest","unittest","xctest"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/q231950.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-21T20:56:42.000Z","updated_at":"2024-09-30T14:41:55.000Z","dependencies_parsed_at":"2024-11-02T23:31:19.299Z","dependency_job_id":"5e11819e-f0c5-4d36-b43d-29767472e54b","html_url":"https://github.com/q231950/rorschach","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/q231950/rorschach","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q231950%2Frorschach","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q231950%2Frorschach/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q231950%2Frorschach/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q231950%2Frorschach/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/q231950","download_url":"https://codeload.github.com/q231950/rorschach/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/q231950%2Frorschach/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28743534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T02:46:29.005Z","status":"ssl_error","status_checked_at":"2026-01-25T02:44:29.968Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bdd","bdd-style","swift-function-builders","swift-result-builders","testing","uitest","unittest","xctest"],"created_at":"2024-08-01T08:00:51.494Z","updated_at":"2026-01-25T04:34:47.017Z","avatar_url":"https://github.com/q231950.png","language":"Swift","funding_links":[],"categories":["Testing"],"sub_categories":[],"readme":"\u003cimg width=800 src=\"Resources/rorschach.png\" alt=\"The Rorschach Logo\"\u003e \n\n\n\n**This package allows you to write XCTest tests in a BDD style.** \n\nSimilar to Swift Regex and SwiftUI it's Swift's result builders that allow for a lightweight DSL that can make your tests way more readable.\n\n\n\nTake a look at the following example:\n\n```swift\nfunc test_simple_example() {\n\n    let universe = UniverseContext()\n\n    expect {\n        Given(\"I have a universe without any stars\") {\n            universe.numberOfStars = 0\n        }\n        When(\"I add a couple of stars\") {\n            universe.numberOfStars = 23\n        }\n        Then(\"I can see the stars I have added ✨\") {\n            XCTAssertEqual(universe.numberOfStars, 23)\n        }\n    }\n}\n```\n\nPlease note that the contents of each [Step](Sources/Rorschach/Step.swift) like `universe.numberOfStars = 23` for example, are arbitrary Swift code - you are free to add your abstractions on a Page Object Model or the like as you need them.\n\nThe test run leads to this result in Xcode's Report Navigator. An easy to read output that can easily be understood in case of a failure.\n\n\u003cimg width=800 src=\"Resources/test-result.png\" alt=\"Corresponding test result in Xcode's Report Navigator\"\u003e\n\n\u003cimg width=800 src=\"Resources/test-result-failure.png\" alt=\"Corresponding test result with failure in Xcode's Report Navigator\"\u003e\n\n---\n\nContributions are much appreciated. Any kind of feedback about whether or not this is helpful for you or if you want to share ways to improve _Rorschach_ are highly welcome. Reach out on Twitter to [q231950](https://twitter.com/q231950) or [create a new issue](https://github.com/q231950/rorschach/issues/new).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fq231950%2Frorschach","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fq231950%2Frorschach","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fq231950%2Frorschach/lists"}