{"id":13908555,"url":"https://github.com/XCTEQ/Vapor-XCTest","last_synced_at":"2025-07-18T07:31:36.797Z","repository":{"id":83858435,"uuid":"123578730","full_name":"XCTEQ/Vapor-XCTest","owner":"XCTEQ","description":"Demo of using Vapor for XCUITests","archived":false,"fork":false,"pushed_at":"2018-03-04T10:59:06.000Z","size":111,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T20:22:16.284Z","etag":null,"topics":["server-side-swift","swift","vapor","xcode","xctest","xcuitest"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XCTEQ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-03-02T12:52:04.000Z","updated_at":"2025-01-16T10:27:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9b10643-3045-4381-a4ed-a760ce3fee3d","html_url":"https://github.com/XCTEQ/Vapor-XCTest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/XCTEQ/Vapor-XCTest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XCTEQ%2FVapor-XCTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XCTEQ%2FVapor-XCTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XCTEQ%2FVapor-XCTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XCTEQ%2FVapor-XCTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XCTEQ","download_url":"https://codeload.github.com/XCTEQ/Vapor-XCTest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XCTEQ%2FVapor-XCTest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265720595,"owners_count":23817268,"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":["server-side-swift","swift","vapor","xcode","xctest","xcuitest"],"created_at":"2024-08-06T23:02:49.392Z","updated_at":"2025-07-18T07:31:36.362Z","avatar_url":"https://github.com/XCTEQ.png","language":"Swift","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Vapor-XCTest\nDemo of using Vapor for stubing network requests for XCUITests in iOS apps. \n\n# Requirements \n\n* Xcode 9 + \n* `openssl`\n* Swift 4+ \n\n# Usage\n\n## Run Example App and Real UITests \n\n* Clone this repository on macOS \n\n```\n$ git clone https://github.com/Shashikant86/Vapor-XCTest\n$ cd Vapor-XCTest\n```\n\n* Open the iOS app in Xcode using the Xcode Project\n\n        $ open Vapor-XCTest.xcodeproj\n        \nThis is example app showing the Github user information. It ak to enter your Github `username` and once clicked on `Submit` button, it displays all the user details. \nNow that, you will see an example app with couple of demo UITests. One with real network request and another with stubbed network request with Vapor \n\nTry, running `LocationCheckWithoutStub.swift` which makes real network request. YOu can see that it uses the `launchEnvironment` value \nfrom real server `app.launchEnvironment = [\"BASEURL\" : \"https://api.github.com\"]` \n\n\n## Run Vapor Server and Stubbed UITest \n\n### Run Vapor Server from command line \n\nNow, navigate to the `Vapor-Server` directory where we have all `Vapor` setup. Build the project and run server. The server will send the dummy response that stubbed in the `main.swift` \n\n         $ cd Vapor-Server\n         $ swift build\n         $ .build/debug/Vapor-Server serve\n         \n\nThis will start vapor server on port `8080` and listen to response from local vapor server. \n\nNow run the UITest `LocationCheckWithVaporStub.swift` which uses local response, you can see that `launchEnvironment` value fro local network. \n`app.launchEnvironment = [\"BASEURL\" : \"http://localhost:8080\"]` \nYou can see that test wil pass with the response Stubbed data from `main.swift \n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXCTEQ%2FVapor-XCTest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FXCTEQ%2FVapor-XCTest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FXCTEQ%2FVapor-XCTest/lists"}