Skip to content
This repository was archived by the owner on Feb 1, 2018. It is now read-only.

Custom app scheme#21

Closed
ap4y wants to merge 5 commits intobendyworks:masterfrom
ap4y:custom_app_name
Closed

Custom app scheme#21
ap4y wants to merge 5 commits intobendyworks:masterfrom
ap4y:custom_app_name

Conversation

@ap4y
Copy link

@ap4y ap4y commented Mar 13, 2013

Right now scheme for xcodebuild and app name for instruments are calculated from workspace file name. I think it would be useful to provide ability to change this behaviour. For example, I'm using special target/scheme for UIAutomation tests with networking stubs.

I have added argument :app_name for rake tasks :compile and :test(including device specific tests). This :argument is optional and can be omitted.

ap4y added 5 commits March 13, 2013 10:58
…ameter. This parameter will be used to resolve scheme name and app path for custom application names
…his parameter will be passed to the run method

- added parameter app_name to the run method, this parameter will be passed to the new app_name property of the Bwoken::Script
- added parameter app_name to the #cmd method, this parameter will be used during build path resolving
@tcoulter
Copy link

tcoulter commented Apr 9, 2013

I'd like to have this as well. Our project's scheme and .workspace filename don't match.

@listrophy
Copy link
Contributor

@ap4y @tcoulter I'm seriously considering abandoning rake as the top-level test runner. I like what @ap4y did with allowing an app_name, but should it really be the one and only argument passed to a rake task? And if we start adding more and more arguments, we run into connascence of position problems. 😦

Anyway, I'm thinking test should be run with a bwoken executable, passing options in a normal, POSIX-like way. Kinda like:

$ bwoken --simulator --app-name=Foo --target=iphone my_test

Thoughts?

@tcoulter
Copy link

+1. Allows for extensibility later on.

I plan on contributing to bwoken significantly soon. Our own test runner (which we're disbanding in favor of bwoken) has other options like custom trace templates, etc., which required a few monkey-patches in a custom rakefile to get the same features out of bwoken. Actually, we had to monkey patch just to get it running, as we have something of a non-standard environment. I'm all for this.

@ap4y
Copy link
Author

ap4y commented Apr 15, 2013

I'm for stand-alone runner too. Executing rake with parameters kind of unnatural for me, and I definitely prefer working with something like OptionParser rather that rake parameters. I think this will be a good step towards the configurable runner.

@ap4y
Copy link
Author

ap4y commented May 16, 2013

I noticed solution for similar problem in xcodebuild gem. Instead of using plain rake task parameters, we can encapsulate all task logic into subclass of the Rake::TaskLib. Example here. So, rake tasks will be configurable and invocation process will be simple. What do you think?

@luketheobscure
Copy link

Any progress on this? I was considering making the same change that @ap4y submitted.

@listrophy
Copy link
Contributor

@luketheobscure no progress... lots on my plate, but that's a terrible excuse.

@listrophy
Copy link
Contributor

I believe the original intent of this PR is now satisfied with #43 merged into master and released as 2.0.0.beta.2.

I'm closing this, but feel free to ask me to re-open (or just create a new issue) if the new code doesn't satisfy your needs.

Thanks everyone for the discussion on this thread. It's resulted in a new direction for bwoken, and I'm really happy about it.

@listrophy listrophy closed this Nov 1, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants