Comments (9)
What I have done in my project
- Include OHTTPStubs, and sample JSON in my main bundle.
- To make sure the sample JSON is not pushed to production I use a different target for production and another one for all other builds. hence all the sample JSON are not a part of production build.
- Use environment variable and check for the environment variable if passed then mock the API calls.
- The environment variable check code is under IF Debug compiler flag hence that does not ship to production either.
- Now this environment variable can be passed in the UI test as launch arguments when launching the application in the UI test.
Hope this helps. Let me know for any more info.
from ohhttpstubs.
Having the same issue here.
from ohhttpstubs.
having the same issue here. I'm using Xcode 13
from ohhttpstubs.
Same issue :(
from ohhttpstubs.
Same issue :(
Can you create a repo for your sample project and share link here. I would love to debug your issue and submit a pr. thanks
from ohhttpstubs.
What I have done in my project
- Include OHTTPStubs, and sample JSON in my main bundle.
- To make sure the sample JSON is not pushed to production I use a different target for production and another one for all other builds. hence all the sample JSON are not a part of production build.
- Use environment variable and check for the environment variable if passed then mock the API calls.
- The environment variable check code is under IF Debug compiler flag hence that does not ship to production either.
- Now this environment variable can be passed in the UI test as launch arguments when launching the application in the UI test.
Hope this helps. Let me know for any more info.
Hi @kishorepran, so how about my JSON file? All of them put in main bundle? I think it will improve the app's size.
from ohhttpstubs.
@Wiley-Wan : Please refer to point 2
from ohhttpstubs.
Related Issues (20)
- Mocktail support HOT 2
- pod 'AFNetworking', '~> 3.0'
- Incorrect example for onStubActivation on Usage Examples page
- [wiki] OHHTTPStubsResponse to HTTPStubsResponse with Swift HOT 4
- Module 'OHHTTPStubs' has no member named 'removeAllStubs' in 9.0.0 HOT 2
- Xcode Analyze: Logic error
- N HOT 1
- Travis CI has seemed to be moved. HOT 3
- OHHTTPStubs with SPM in Xcode 12.5 HOT 1
- Fluent API for stubbing
- how do i use it HOT 1
- Liscense HOT 1
- 4 da world HOT 1
- - [ ] Submitting a maybeaplle @mtodd []()![image](https://user-images.githubusercontent.com/122186144/230750410-f43c3ffb-f6a7-4bd4-9970-8b065670ea28.jpeg)@craystyle1212
- Won't build with Carthage and Xcode 14.3 HOT 7
- App Crashes on Device When OHHTTPStubsSwift Added to iOS Framework via Swift Package Manager HOT 1
- FEATURE REQUEST: Ability to control response stream
- `canInitWithRequest` not called in Xcode 15 preventing stubbing being setup correctly
- Request to provide Privacy Manifest file for OHHTTPStubs SDK HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ohhttpstubs.