Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Facebook's xctool #308

Closed
parse opened this issue Jan 20, 2015 · 9 comments
Closed

Add support for Facebook's xctool #308

parse opened this issue Jan 20, 2015 · 9 comments

Comments

@parse
Copy link

parse commented Jan 20, 2015

Related to: facebookarchive/xctool#417

It would be awesome to be able to run Cedar in xctool.

Thanks

@akitchen
Copy link
Contributor

Hey @parse thanks for cross-linking that issue. Yes, Faceboook xctool support would be nice. We'll spend some time looking into it via the info referenced in that issue and follow up soon.

@timrosenblatt
Copy link

Hey Andrew, I just wanted to bump this. I work at Ship.io and we really want to be able to support Cedar for our users, but it doesn't work right now because of the xctool incompatibility. Do you have a sense of what changes need to be made for it to work?

@stamhankar999
Copy link

I second that!

@eileenchow
Copy link

I third that!

@akitchen
Copy link
Contributor

akitchen commented May 6, 2015

Thanks for all the bumps on this thread, it's good to gauge interest in this issue. I realize I neglected to add more info earlier after spending some time investigating while between projects.

Unfortunately, this incompatibility boils down to how xctool discovers test cases - it expects them to be XCTestCase subclasses, which Cedar's specs are not. While Cedar fully supports running specs inside an XCTest bundle alongside XCTestCases, it is not as tightly coupled to XCTest as other third party testing frameworks. We also use our spec classes outside of bundles for test harnesses and other kinds of testing infrastructure, for which XCTest is not well suited.

To address this, Cedar would need to couple more tightly with XCTest, or xctool would need some additional work to be aware of Cedar specs. I haven't checked, but I assume that xctool might not work with GHUnit for the same reason.

Unfortunately we probably won't have bandwidth to patch xctool or Cedar for this issue in the near future, at least not during working hours due to project load. If anyone who uses xctool more regularly wants to try their hand at a patch, please refer to the helpful links in the corresponding issue thread facebookarchive/xctool#417 .

@tjarratt
Copy link
Contributor

tjarratt commented Oct 8, 2015

Thanks to some wonderful investigatory work that @briancroom did recently, it is now possible to run Cedar specs that are setup as a Test Bundle with xctool, using the xctool test action. Running spec suites feels to be outside the scope of this, for some of the reasons that @akitchen enumerated.

@parse how do you feel about closing this issue? Is there any more we could do here to improve support?

@alexbasson
Copy link

FWIW, due to yesterday's merge, today @idoru and I started using xctool as
part of our build process on GiveLively, and it's working great. Thanks for
the great work, @briancroom!

On Thu, Oct 8, 2015 at 1:34 AM, Tim Jarratt notifications@github.com
wrote:

Thanks to some wonderful investigatory work that @briancroom
https://github.com/briancroom did recently, it is now possible to run
Cedar specs that are setup as a Test Bundle with xctool, using the xctool
test action. Running spec suites feels to be outside the scope of this,
for some of the reasons that @akitchen https://github.com/akitchen
enumerated.

@parse https://github.com/parse how do you feel about closing this
issue? Is there any more we could do here to improve support?


Reply to this email directly or view it on GitHub
#308 (comment).

@briancroom
Copy link
Contributor

For future reference in case this breaks again, the code within xctool that was failing to find the Cedar specs is located here, in the otest-query helper tool. Previously, the XCTestSuite instance retrieved by that line contained no tests. Cedar is now swizzling the allTests method to add the specs as a child suite before returning it.

@tjarratt
Copy link
Contributor

Thanks @briancroom for all your help in getting this working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants