<div dir="ltr">A small update to this, I just landed a PR which allows you to filter out these tests if you're only interested in short-running unit-style tests. From the <a href="https://github.com/juju/juju/blob/master/featuretests/doc.go#L20">package godoc</a>:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">To run tests excluding the functional tests in this package, specify<br>the "--featuretests=false" option: </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="color:rgb(150,152,150);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:16.7999992370605px;white-space:pre"> </span>go test <a href="http://github.com/juju/juju/.">github.com/juju/juju/.</a>.. --featuretests=false</blockquote></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 9:00 PM, Ian Booth <span dir="ltr"><<a href="mailto:ian.booth@canonical.com" target="_blank">ian.booth@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you Katherine, it's great to see this important work come to fruition.<br>
<br>
One area of the code in particular which will benefit from this is the CLI,<br>
implemented in cmd/juju. Historically, cmd/juju "unit" tests were written on top<br>
of a full stack (as an aside, any test suite which embeds JujuConnSuite is not a<br>
unit test). Recently implemented commands have tests which stub out the api<br>
client and are written as true unit tests. However, these are missing end-end<br>
integration tests.<br>
<br>
Obviously we should look to split, as time allows, existing command tests into<br>
unit tests and feature tests. But could authors of recently added command tests<br>
which are missing feature tests please go ahead and add those.<br>
<br>
To reinforce what Katherine says, the feature tests should only really cover the<br>
happy path, to ensure that everything is wired together and working properly.<br>
<br>
Moving forward, reviewers should look to push back on branches which 1) do not<br>
use proper unit tests, 2) do not have feature tests.<br>
<span class=""><br>
On 09/01/15 12:03, Katherine Cox-Buday wrote:<br>
> Hey everyone,<br>
><br>
> I just landed a PR which introduces a new package for Juju which is<br>
> intended to host long-running end-to-end feature tests. You can have a look<br>
> here: <a href="http://github.com/juju/juju/blob/master/featuretests/doc.go" target="_blank">github.com/juju/juju/blob/master/featuretests/doc.go</a><br>
><br>
> A little context as I understand it:<br>
><br>
</span>> 1. This is the direct result of the team's discussion about segregating<br>
<span class="">> long-running tests from short-running tests.<br>
</span>> 2. It is the intention of the team that tests now be written thus:<br>
> - Light-weight unit tests alongside Juju core packages.<br>
> - End-to-end feature tests in this new package.<br>
<div class="HOEnZb"><div class="h5">><br>
> Hopefully this allows us to be more agile as we modify code, but still<br>
> maintain the safety-net of end-to-end tests. The main difference for me is<br>
> that the bulk of our tests -- where we test edge-cases, all permutations of<br>
> calls, etc. -- will now be in lightweight unit tests. The heavier-weight,<br>
> end-to-end tests will now be used in a 1:1 ratio with user-facing features,<br>
> and the number of these that we have to maintain should drop off a bit.<br>
><br>
> This has been a great team effort to steer a very large change; kudos to<br>
> you all!<br>
><br>
> -<br>
> Katherine<br>
><br>
><br>
><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Juju-dev mailing list<br>
<a href="mailto:Juju-dev@lists.ubuntu.com">Juju-dev@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju-dev" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju-dev</a><br>
</font></span></blockquote></div><br></div>