Testing sbt plugin

5 views
Skip to first unread message

Stefan Langer

unread,
Feb 4, 2010, 3:01:27 PM2/4/10
to simple-b...@googlegroups.com
Hi all,

I've written a plugin for sbt for generating project and classpath files for Eclipse. (http://github.com/musk/SbtEclipsify) Currently I'm working on upgrading it to 0.6.12 and for this purpose I want to create a few tests. Now I didn't find anything about how to test plugins. Is there anyway to setup a mock/dummy Project for testing purposes? If not is there a way to obtain the path to the root and the src of the project from within a test class which is part of the Sbt project?

Any hints greatly appreciated

-Stefan

Miles Sabin

unread,
Feb 4, 2010, 3:05:44 PM2/4/10
to simple-b...@googlegroups.com
On Thu, Feb 4, 2010 at 8:01 PM, Stefan Langer
<mailto...@googlemail.com> wrote:
> I've written a plugin for sbt for generating project and classpath files for
> Eclipse. (http://github.com/musk/SbtEclipsify)

Great stuff ... let me know if there's anything I can do to help from
the Eclipse end.

Cheers,


Miles

--
Miles Sabin
tel: +44 (0)7813 944 528
skype: milessabin
http://www.chuusai.com/
http://twitter.com/milessabin

Mark Harrah

unread,
Feb 4, 2010, 6:08:37 PM2/4/10
to simple-b...@googlegroups.com
Hi Stefan,

Normally you could use the integration test framework. It is on my
list of things to update the documentation for before 0.7 is out.

-Mark

> --
> You received this message because you are subscribed to the Google Groups
> "simple-build-tool" group.
> To post to this group, send email to simple-b...@googlegroups.com.
> To unsubscribe from this group, send email to
> simple-build-t...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/simple-build-tool?hl=en.
>
>

Stefan Langer

unread,
Feb 5, 2010, 3:48:48 AM2/5/10
to simple-b...@googlegroups.com
Where can I find the documentation for it for the 0.5.6 release?

BTW great tool!! Keep up the good work

-Stefan

2010/2/5 Mark Harrah <dmha...@gmail.com>

Mark Harrah

unread,
Feb 5, 2010, 9:50:38 AM2/5/10
to simple-b...@googlegroups.com
Hey Stefan,

http://code.google.com/p/simple-build-tool/wiki/ChangeDetectionAndTesting#Testing

The version in 0.6 allows any command to follow '>' (previously, only
project actions were allowed, not 'reload' or changing projects).
Command failure is now indicated by preceding the '>' with a '-'
instead of [success]/[failure].

However, it works by forking 'xsbt', so you need an 'xsbt' script on
your path. To test a plugin, test projects have to declare the plugin
in project/plugins/. Both of these have to be changed before I think
it is really usable for plugin testing like it was in 0.5.6.

-Mark

>> > simple-build-t...@googlegroups.com<simple-build-tool%2Bunsu...@googlegroups.com>


>> .
>> > For more options, visit this group at
>> > http://groups.google.com/group/simple-build-tool?hl=en.
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "simple-build-tool" group.
>> To post to this group, send email to simple-b...@googlegroups.com.
>> To unsubscribe from this group, send email to

>> simple-build-t...@googlegroups.com<simple-build-tool%2Bunsu...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages