Testing


(Jason Lee) #1

I've read thru a few posts about XCTest with swift open source (which I'll refer to from here on out as swift-os). I'm familiar with XCTest in the usual XCode toolchain and use it all the time on my XCode projects. However, I'm still trying to figure out the best way to use it on swift-os.

My two issues now are:
1. I can't even import the XCTest package into my project
2. How to bootstrap it

I know there's been some discussion in that project on github, but it seems like the way I've seen others 'solve' this is to just use Xcode if I'm on a Mac (which I am). One of my goals for this project is not to have to use Xcode (I know I'm making it harder on myself missing out on code completion, etc). One side effect of this is I really have to know how all these things work.

Ideally I'd like to just have something like 'swift test' or maybe a binary exec that could run my tests for me? Seems like that's the preferred way, so maybe just trying to fig out how to solve #1 above is my big priority.

Thanks...

···

Sent from my iPhone


(David Turnbull) #2

This was accepted for Swift 3.0:
https://github.com/apple/swift-evolution/blob/master/proposals/0019-package-manager-testing.md

SE-0019 adds 'swift test' among other things.

-david

···

On Wed, Jan 27, 2016 at 10:26 AM, Jason Lee via swift-users < swift-users@swift.org> wrote:

I've read thru a few posts about XCTest with swift open source (which I'll
refer to from here on out as swift-os). I'm familiar with XCTest in the
usual XCode toolchain and use it all the time on my XCode projects.
However, I'm still trying to figure out the best way to use it on swift-os.

My two issues now are:
1. I can't even import the XCTest package into my project
2. How to bootstrap it

I know there's been some discussion in that project on github, but it
seems like the way I've seen others 'solve' this is to just use Xcode if
I'm on a Mac (which I am). One of my goals for this project is not to have
to use Xcode (I know I'm making it harder on myself missing out on code
completion, etc). One side effect of this is I really have to know how all
these things work.

Ideally I'd like to just have something like 'swift test' or maybe a
binary exec that could run my tests for me? Seems like that's the preferred
way, so maybe just trying to fig out how to solve #1 above is my big
priority.

Thanks...

Sent from my iPhone
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Jason Lee) #3

Woohoo, thx guys! :slight_smile:

···

Sent from my iPhone

On Jan 27, 2016, at 11:02 AM, David Turnbull <dturnbull@gmail.com> wrote:

This was accepted for Swift 3.0:
https://github.com/apple/swift-evolution/blob/master/proposals/0019-package-manager-testing.md

SE-0019 adds 'swift test' among other things.

-david

On Wed, Jan 27, 2016 at 10:26 AM, Jason Lee via swift-users <swift-users@swift.org> wrote:
I've read thru a few posts about XCTest with swift open source (which I'll refer to from here on out as swift-os). I'm familiar with XCTest in the usual XCode toolchain and use it all the time on my XCode projects. However, I'm still trying to figure out the best way to use it on swift-os.

My two issues now are:
1. I can't even import the XCTest package into my project
2. How to bootstrap it

I know there's been some discussion in that project on github, but it seems like the way I've seen others 'solve' this is to just use Xcode if I'm on a Mac (which I am). One of my goals for this project is not to have to use Xcode (I know I'm making it harder on myself missing out on code completion, etc). One side effect of this is I really have to know how all these things work.

Ideally I'd like to just have something like 'swift test' or maybe a binary exec that could run my tests for me? Seems like that's the preferred way, so maybe just trying to fig out how to solve #1 above is my big priority.

Thanks...

Sent from my iPhone
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users