<div dir="ltr"><div><div><div><div>A new comment for an older email thread...<br><br></div>How about constructing automated EE UI tests for each of the user stories? <a href="https://github.com/almighty/almighty-core/labels/userstory">https://github.com/almighty/almighty-core/labels/userstory</a><br><br></div>We should be able to string these tests together to serve as a good EE acceptance test.<br><br></div>'Opinions? - Thx!,<br></div>Len D.<br><div><div><div><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 21, 2016 at 3:49 AM, Pavol Pitonak <span dir="ltr"><<a href="mailto:ppitonak@redhat.com" target="_blank">ppitonak@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>this is in line with what I would suggest. In Red Hat we usually refer to these "classes" as tiers.<br><br></div>For actual tools that you might use, I would suggest to start with whatever is most popular in Node.js/JavaScript community. You will get a lot of documentation for best practices and troubleshooting.<br><br></div>For unit tests, have a look on Mocha (<a href="http://mochajs.org" target="_blank">mochajs.org</a>) and Jasmine (<a href="http://jasmine.github.io" target="_blank">jasmine.github.io</a>). The main difference is that Jasmine is all-in-one solution while Mocha is only test runner. You need an assertion library (e.g. chai) and library for creating fakes (spies, stubs and mocks) such as Sinon. Mocha+Chai+Sinon is much more powerful but Jasmine is sufficient in 99.9% of cases and forces you to create your tests in one way.<br><br></div><div>For functional tests, I would go for Karma. Most people seem to use it with Jasmine but it's possible to use it also with Mocha. <br><br></div><div>For e2e tests, Protractor seems to be the best place to start. It uses WebDriver/Selenium in the background.<br></div><div><br>Whatever stack you choose, keep the code style (assertions etc.) consistent.<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 20, 2016 at 5:13 PM, Leonard Dimaggio <span dir="ltr"><<a href="mailto:ldimaggi@redhat.com" target="_blank">ldimaggi@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Good discussion Michael! See comment below:<br><div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Sep 20, 2016 at 8:53 AM, Michael Kleinhenz <span dir="ltr"><<a href="mailto:kleinhenz@redhat.com" target="_blank">kleinhenz@redhat.com</a>></span> wrote:<br></span><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
just to start some discussion. I would divide tests for the ui into<br>
three classes:<br>
<br>
1. Unit Tests<br>
-> ususal stuff, testing internal wiring and payload code.<br>
<br>
2. Functional Tests<br>
-> tests of the ui behaviour, like "when I add a workitem using the<br>
form, does it appear in the listview?". For this tests, I would go for<br>
a full mocking of external services and use something native to keep<br>
dependencies footprint small.<br>
<br>
3. Smoke (or E2E) Tests<br>
-> tests the full setup, starts all services, cases go full stack. For<br>
this, we'll need a powerful test framework that can cover full stack.<b><br></b></blockquote></span><div><b>------> I'd also like to see us be able to verify faily complex, multi-step scenarios in these tests.  </b>Glad to see that you refer to these as E2E tests and not just smoke tests.<br></div><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
For responsibility (or location), I'll see 1 and 2 go into the<br>
respective repository. For 3, I'll would see that as a seperate thing,<br>
*maybe* even a seperate repository.<br>
<br>
Any thoughts?<br>
<br>
-- Michael<br>
<br>
--<br>
Michael Kleinhenz<br>
Principal Software Engineer<br>
<br>
Red Hat Deutschland GmbH<br>
Werner-von-Siemens-Ring 14<br>
85630 Grasbrunn<br>
Germany<br>
<br>
RED HAT | TRIED. TESTED. TRUSTED.<br>
Red Hat GmbH, <a href="http://www.de.redhat.com" rel="noreferrer" target="_blank">www.de.redhat.com</a>,<br>
Registered seat: Grasbrunn, Commercial register: Amtsgericht München,<br>
HRB 153243,<br>
Managing Directors: Paul Argiry, Charles Cachera, Michael Cunningham,<br>
Michael O'Neill<br>
<br>
______________________________<wbr>_________________<br>
almighty-public mailing list<br>
<a href="mailto:almighty-public@redhat.com" target="_blank">almighty-public@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/almighty-public" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/almighty-public</a><br>
</blockquote></span></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Len DiMaggio (<a href="mailto:ldimaggi@redhat.com" target="_blank">ldimaggi@redhat.com</a>)<br>JBoss by Red Hat<br>314 Littleton Road<br>Westford, MA 01886  USA<br>tel:  <a href="tel:978.392.3179" value="+19783923179" target="_blank">978.392.3179</a><br>cell: <a href="tel:781.472.9912" value="+17814729912" target="_blank">781.472.9912</a><br><a href="http://www.redhat.com" target="_blank">http://www.redhat.com</a><br><a href="http://community.jboss.org/people/ldimaggio" target="_blank">http://community.jboss.org/peo<wbr>ple/ldimaggio</a><br><br><img src="http://www.redhat.com/g/logos/RedHat_JBoss_logo.png"><br></div></div></div></div>
</font></span></div></div></div>
<br>______________________________<wbr>_________________<br>
almighty-public mailing list<br>
<a href="mailto:almighty-public@redhat.com" target="_blank">almighty-public@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/almighty-public" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/almighty-public</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Len DiMaggio (<a href="mailto:ldimaggi@redhat.com" target="_blank">ldimaggi@redhat.com</a>)<br>JBoss by Red Hat<br>314 Littleton Road<br>Westford, MA 01886  USA<br>tel:  978.392.3179<br>cell: 781.472.9912<br><a href="http://www.redhat.com" target="_blank">http://www.redhat.com</a><br><a href="http://community.jboss.org/people/ldimaggio" target="_blank">http://community.jboss.org/people/ldimaggio</a><br><br><img src="http://www.redhat.com/g/logos/RedHat_JBoss_logo.png"><br></div></div></div></div>
</div>