kif-framework / amyserver Goto Github PK
View Code? Open in Web Editor NEWA mock server fully integrated with KIF.
License: Other
A mock server fully integrated with KIF.
License: Other
Hello,
I don't know if anyone is still maintaining this repo, but wanted to mention an issue that I'm seeing. We have an HTTP request that goes through when our app is first loaded, and only if the user is authenticated.
This request goes through before we are able to call server().start()
in our tests, which starts AMYServer. It seems that this initial requests breaks any future attempts to mock web requests.
I have Charles proxy open, and whenever this initial request gets fired before server().start()
, no future requests are mocked by AmyServer (everything shows up in Charles proxy). However, if I comment out this initial request and we can call server().start()
before any requests go through, then everything works as expected (all future HTTP requests are mocked, and nothing shows up in Charles proxy).
Can you think of anything that would cause this behaviour? If so, is there an easy fix? For now, I'm just going to add a delay before we fire off that initial request, but it's a bit of an ugly hack.
@bnickel, I would like to rename AMYServer to KIF.MockServer to make it clear that it is part of the KIF ecosystem and what its purpose is. Is this change okay with you?
KIF 2.1.0 (still unreleased) supports XCTest, which breaks AMYServer integration, I've fixed it locally by updating the podspec to include:
s.compiler_flags = '-DKIF_XCTEST'
s.framework = 'XCTest'
s.dependency 'KIF', :git => 'git://github.com/kif-framework/KIF.git', :commit => '0295bb8fc84615b5d461da53f5a818a63e20bbaf'
I don't think it supports AMYServer built in test suite though. I'll look into fixing this. Thanks for making the pod!
Hi, could you help me, I'm trying to integrate AMYServer to mock some services in my project, but I can't find the equivalent of #define myServer KIFActorWithClass(MyServer)
using KIF v.3.5.1 and Swift
Thanks in advance
Hi,
I'm using Alamofire on my project and trying to use AMYServer.
But it's not worked.
Because - (id)initWithRequest:(NSURLRequest *)request cachedResponse:(NSCachedURLResponse *)cachedResponse client:(id<NSURLProtocolClient>)client
isn't called.
Therefore _AMYURLProtocol
's pendingRequests
has nothing.
Podfile
target 'ProductTests', :exclusive => true do
pod 'KIF', '> 3.0'> 2.0'
pod 'AMYServer', '
end
Console Log
Analyzing dependencies
[!] Unable to satisfy the following requirements:
AMYServer (~> 2.0)
required by Podfile
@phatmann I assume you have the rights. The updated pod spec is ready to go.
I've install AMYServer
via Cocoapods
So, [NSBundle KIFTestBundle]
can't contain my mocktail files. also [NSBundle mainBundle]
.
These files are contained in [NSBundle allBundles][1]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.