Comments (10)
I've been looking into adding logging support to Kiwi, I'm just about to work on this so if you'd like to have some input into how it should work, do leave a reply.
I'm thinking that building in some logging hooks should be enough to allow people to write their own loggers by implementing a protocol. Some default loggers can be provided too.
The issue with using SenTestObserver is that all kiwi specs in a single context run within a single SenTest test case which would mean the SenTestObserver hooks aren't fine-grained enough.
from kiwi.
Incidentally, one of the reasons I wanted to do this is to aid writing a command-line utility for running specs; if spec details could be spat out in an easily parsable format (e.g. JSON) then it would be simple to write a script that runs xcodebuild and parses the JSON data on the fly to provide cleaner spec input (and perhaps similar output options to RSpec).
from kiwi.
Oh, so I just tweeted at somebody about this. I thought it was a bug, but because all my specs were coming up with:
Executed 1 test, with 0 failures (0 unexpected) in 0.004 (0.005) seconds
But that must just be the way its implemented. I'm pretty keen to get on this. Any pointers?
from kiwi.
Sounds like a good idea, the reason SenTest was 'hijacked' in the first place was because it reduced the barrier to entry, but I fought with getting 'proper' and customizable logging from day one. Never was satisfied in the end.
from kiwi.
I think building on top of SenTest is a good thing; it maintains Xcode integration and saves a lot of unnecessary work.
from kiwi.
Keith: you're right, because each KW_SPEC block essentially becomes a single SenTest test case, it's hard to report errors/failures properly using the built-in mechanism that SenTest provides.
I've already started work on improving this; the SenTest log output is quite important to Xcode as it relies on it to report failures within the GUI but I'm going to be working on a separate command-line runner that will be much more fully featured.
from kiwi.
Hi Luke -
I wanted to know where things stand with the commandline runner and if you could use some help on the effort. I developed a CLI runner for UISpec's test harness last year that works quite well (https://github.com/twotoasters/UISpecRunner). The runner works by wrapping xcodebuild and then supplying testing targets via environment variables (UISPEC_SPEC, UISPEC_EXAMPLE, etc). The tests are run via WaxSim, a shell script (headlessly) or AppleScript. Obviously some things would have to be reworked for SenTest, but there is probably useful overlap.
I am keen to fully adopt Kiwi for all my iOS projects going forward, but I am really missing the ability easily target subsets of the suite easily via the CLI.
from kiwi.
Luke, any info on how you are progressing on this? I have been thinking a bit about this recently.
from kiwi.
No progress on a command-line runner but it should be made significantly easier by my latest refactoring (see the one-test-per-example branch). More importantly, each spec is now a separate test case and each gets logged even on success. Check it out, I will merge to master soon.
from kiwi.
Merged into master.
from kiwi.
Related Issues (20)
- Use predicate in stubbed properties when filtering mock objects in array HOT 1
- Macros autocomplete not working HOT 1
- when the second run testCase, not real run and success directly
- Swift 3 cocoapods run failed HOT 3
- Tests are executed in a wrong order under certain conditions (Xcode 8.3, single suite)
- Please help me :D Invalid pointer dequeued from free list
- Using a sharedExample in another HOT 2
- kiwi report error that' SenTestingKit/SenTestingKit.h file not found' HOT 2
- build synthetic seismogram in a specific station HOT 1
- Stop tests execution if one test is failed HOT 1
- Xcode 9: `any` Macro Conflicts with Generated Swift Header Macro `SWIFT_MODULE_NAMESPACE_PUSH` HOT 6
- Preparing next release HOT 8
- theValue(BOOL) not working with should receive
- XCTest.framework/XCTest' does not contain bitcode HOT 2
- expectFutureValue not working HOT 2
- How to test cadisplaylink
- Oops… the system encountered a problem (#500) - Retrying in X:XXs… HOT 1
- SharedExample with multiple 'it' blocks
- SIGABRT: kiwi crashes at KWProbePoller
- Preparing a new version (3.1.0) - Upgrading to Xcode 11 HOT 4
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 kiwi.