GithubHelp home page GithubHelp logo

XCTest integration about specta HOT 34 CLOSED

specta avatar specta commented on June 3, 2024
XCTest integration

from specta.

Comments (34)

jkrall avatar jkrall commented on June 3, 2024

+1 ... I just discovered that specta isn't compatible with XCode 5's xcunit, bummer!

Not sure how far you got here, but if you have this working, I'd love to check it out.

from specta.

blakewatters avatar blakewatters commented on June 3, 2024

Take a look at the work recently merged to Kiwi: https://github.com/allending/Kiwi/pull/366

It should be straightforward to follow this work and implement the same on Specta.

from specta.

 avatar commented on June 3, 2024

I've parked some changes here... Still working some failing tests, but it's mostly functional in Xcode 5 and AppCode 2.5 EAP now. I did not take the approach Kiwi did to preserve support for otest bundles and retain both sets of dependencies -- instead applied as a direct substitution. - https://github.com/mgrimes/specta/tree/xctest_integration

from specta.

ahti avatar ahti commented on June 3, 2024

Any news on this? Expecta now works with XCTest.

from specta.

ashfurrow avatar ashfurrow commented on June 3, 2024

Any word on this? I'd like to include Specta in a book I'm writing but would strongly prefer XCTextIntegration.

from specta.

tonyarnold avatar tonyarnold commented on June 3, 2024

What's the thinking on this? Is @mgrimes taking the right approach by dropping SenTestingKit support entirely? I've got a branch at tonyarnold/specta/tree/xctest that supports both, but isn't yet functional, and I wonder if there's really a lot of point in pouring effort into continuing to support SenTestingKit.

Thoughts?

from specta.

gfontenot avatar gfontenot commented on June 3, 2024

I'd vote to drop OCUnit/SenTest completely. There's nothing stopping someone from checking out a pre-xctest version of the library if they haven't migrated to XCTest, and Apple isn't going to put any more effort into SenTestingKit. Are there reasons to keep OCUnit/SenTest support around that I'm not aware of?

from specta.

ashfurrow avatar ashfurrow commented on June 3, 2024

I'm a little biased since I don't have any existing projects relying on Specta with SenTest. That said, as a prospective user of the project, I don't see the value in SenTest support.

from specta.

Abizern avatar Abizern commented on June 3, 2024

I think so too. If you want SenTest Support use an older version. I'd vote for just bumping the major version number up and supporting XCTest only.

from specta.

nerdyc avatar nerdyc commented on June 3, 2024

I agree on having an XCTest version. When I tried to port Specta this summer, I had to ifdef a lot of code; it's not straightforward for a project like Specta.

On Oct 23, 2013, at 7:40, Abizer Nasir [email protected] wrote:

I think so too. If you want SenTest Support use an older version. I'd vote for just bumping the major version number up and supporting XCTest only.


Reply to this email directly or view it on GitHub.

from specta.

tibr avatar tibr commented on June 3, 2024

Dropping SenTestingKit sounds great, thanks to CocoaPods it's trivial for users that need SetTest Support to use an older version.

from specta.

robb avatar robb commented on June 3, 2024

What's the migration path from SenTest to XCTest? Anything that could rain on a users parade when updating?

from specta.

ashfurrow avatar ashfurrow commented on June 3, 2024

@robb Users can upgrade to XCTest using the Edit -> Refactor -> Convert to XCTest option.

from specta.

robb avatar robb commented on June 3, 2024

💖

from specta.

tonyarnold avatar tonyarnold commented on June 3, 2024

So this seems like a pretty definitive answer going forward: https://twitter.com/joar_at_work/status/393121651321106432

from specta.

petejkim avatar petejkim commented on June 3, 2024

Alright I guess the consensus is to dump sentestingkit support and move to xctest in v0.2 will start working on it asap.

from specta.

ashfurrow avatar ashfurrow commented on June 3, 2024

❤️

from specta.

Abizern avatar Abizern commented on June 3, 2024

@tibr it's trivial using Git Submodules as we'll. :)

from specta.

mickeyreiss avatar mickeyreiss commented on June 3, 2024

👍 for XCTest support at the expense of losing SenTesting support.

from specta.

bainfu avatar bainfu commented on June 3, 2024

Found this while researching this issue last night: https://bitbucket.org/statefullabs/specta/

from specta.

tonyarnold avatar tonyarnold commented on June 3, 2024

Thanks @bainfu — that's @mgrimes' repository (he linked to his fork earlier in this thread).

from specta.

petejkim avatar petejkim commented on June 3, 2024

Thanks, that is definitely useful, my goal is to ship v0.2 with xctest+arc by the end of this week.

from specta.

tonyarnold avatar tonyarnold commented on June 3, 2024

@petejkim what can we do to help? Anything?

from specta.

petejkim avatar petejkim commented on June 3, 2024

@tonyarnold maybe you could help with #46 if you are free, I will look at and finish the xctest stuff this weekend

from specta.

tonyarnold avatar tonyarnold commented on June 3, 2024

Absolutely can, @petejkim — I'll take a run at it tonight.

from specta.

petejkim avatar petejkim commented on June 3, 2024

@tonyarnold added you to the org. you can create a branch and commit to the main repo

from specta.

petejkim avatar petejkim commented on June 3, 2024

@nerdyc @jkrall @blakewatters @mgrimes @ahti @ashfurrow @tonyarnold @gfontenot @Abizern @tibr @mickeyreiss @jspahrsummers @bainfu

Finished XCTest integration: https://github.com/specta/specta/tree/xctest

All specs pass, but I had to temporarily remove custom reporter support. Will add that back in later.

Could you please help test it with your existing projects? We'll ship it if everything seems ok.

from specta.

Abizern avatar Abizern commented on June 3, 2024

Thank you so much for this!

Abizer

On 29 Oct 2013, at 11:52, Peter Jihoon Kim [email protected] wrote:

@nerdyc @jkrall @blakewatters @mgrimes @ahti @ashfurrow @tonyarnold @gfontenot @Abizern @tibr @mickeyreiss @jspahrsummers @bainfu

Finished XCTest integration: https://github.com/specta/specta/tree/xctest

All specs pass, but I had to temporarily remove custom reporter support. Will add that back in later.

Could you please help test it with your existing projects? We'll ship it if everything seems ok.


Reply to this email directly or view it on GitHub.

from specta.

mickeyreiss avatar mickeyreiss commented on June 3, 2024

@petejkim 👍 The upgrade was easy in a OCUnit/Specta project and seemed to work fine.

One question: Would it be possible to change the XCTest output when I run focused tests (using fit and fdescribe) ?

This is what I'm getting right now:
Executed 78 tests, with 0 failures (0 unexpected) in 1.847 (1.897) seconds

I'd expect:
Executed 1 test, with 0 failures (0 unexpected, 0 pending) in 1.847 (1.897) seconds

I've manually verified that the focused tests are actually running exclusively using breakpoints.

Similarly, there is no reporting on pending tests yet.

from specta.

robb avatar robb commented on June 3, 2024

@mickeyreiss good thinking. Is that a regression compared to SenTest? If not, would you mind opening a separate issue for that?

from specta.

petejkim avatar petejkim commented on June 3, 2024

@mickeyreiss @robb that's because i removed custom reporter support for now. will add that back in 2.0.1 release probably @nerdyc

from specta.

mickeyreiss avatar mickeyreiss commented on June 3, 2024

@petejkim Makes sense to me. I'd definitely advocate for anything we can do to prevent ourselves from accidentally committing focused or pending tests. Actual Xcode support would be awesome. ⛵

from specta.

rsaunders100 avatar rsaunders100 commented on June 3, 2024

Am I correct In thinking that specta no longer supports OCUnit (Since there is now a reference to the XCTest framework in the podspec)?

I am currently experimenting with reverting back to OCUnit to get unit tests running on the iOS 6, but specta isn't compatible it seems....

from specta.

modocache avatar modocache commented on June 3, 2024

@rsaunders100 One alternative is to use the Kiwi testing framework still supports OCUnit test bundles (for the time being), and has syntax very similar to Specta's.

If your project uses Specta and Expecta, you will have to change the assertions from EXP_expect(subject).to to the Kiwi syntax,[subject should]. Other than that, the migration should be fairly straightforward.

from specta.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.