On 21/11/2016 17:37, Matteo Di Carlo wrote:
Hi,
here <https://gist.github.com/mteo/57e5e8fd56c723085dc212576b7acbe8>
is one possible solution I found today to run tests AND prepare a test
environment in the same time. Test related plugins are included in a
new profile.
This could be a good solution if the new profile is the only one using
those plugins I think.
With your changes, now enduser integration tests will fail during a plain
mvn clean verify
as the required plugins are not configured any more in the default profile.
This breaks the current set up.
The point is that enduser integration tests involves both propagation
and execution:
1. propagation and execution must be *both run* during plain build (e.g.
"mvn clean verify")
2. propagation and execution must be *both skipped* if required (e.g. in
the skipTests profile)
Essentially, you would like to add a new profile (say 'dev') where
preparation is run but execution is skipped - thus allowing for manual
tst execution against a fully-compliant test environment.
Did I get it right?
If so, you should not remove any line from the current
fit/enduser-reference/pom.xml but rather only add a new profile.
HTH
Regards.
On 21/11/2016 09:43, Francesco Chicchiriccò wrote:
Matteo,
please draft an updated
fit/enduser-reference/pom.xml
somewhere (gist, as suggested should be good enough) so that we can
take an effective look at the proposed changes.
Thanks.
Regards.
On 18/11/2016 18:03, Andrea Patricelli wrote:
Hi all,
I think that hacking the pom.xml of the fit/enduser cannot be a long
lasting solution. So I agree about introducing a specific profile
for developing of IT tests, it could help for the current developing
needs.
It would also be cool to have more granularity and run specific
tests using maven like Francesco pointed out.
Actually, as it seems to me, the main problem is that to develop and
run an IT test for the enduser we must wait for the complete cargo
system to startup, we have no granularity. It is not feasible while
developing tests. We need to run single tests (while developing)
against a running syncope environment (enduser ui + core), and at
the moment AFAIK we are not able to run single tests through maven,
we have to use js tools as Matteo said.
Best regards,
Andrea
Il giorno 18 nov 2016, 17:31, alle ore 17:31, Matteo Di Carlo
<[email protected]> ha scritto:
On 18/11/2016 16:00, Francesco Chicchiriccò wrote:
On 18/11/2016 15:20, Matteo Di Carlo wrote:
Hi all,
I would like to share some considerations about enduser testing.
After tests have been written or updated we are able to run them
manually through node and protractor directly from
${enduser-test.dir}: a directory created in /fit/enduser/target
during pre-integration-test phase. During the same phase protractor,
phantomjs and node are installed too.
Actually in the build cycle these four operations are skipped, so
every time we work on enduser tests we need to temporarily modify
syncope-fit-enduser-reference pom to run tests manually.
Could be usefull to create a Enduser test specific maven profile ?
Hi Matteo,
please go ahead and post your proposed changes to
fit/enduser-reference/pom.xml somewhere (Gist?), I am not sure to
understand why you need it: is your purpose to build an easy way to
leave Syncope running with the ability to manually run some JS tests
against it?
In fit/core-reference you can achieve something similar by running
mvn -Pdebug
or
mvn -Pdebug,all
and then (for example)
mvn test -Dtest=GroupITCase
Is my understanding correct? Could you please provide a concrete
example, besides your proposed changes?
Regards.
Hi Francesco,
correct. the goal is developing enduser tests in a faster way, but
mainly I couldn't find where to run Node outside the enduser-test.dir
if
not created.
We can run tests with mvn clean verify, but running them with node
while
developing brings few advantages :
-we can choose which test to run, e.g. if we are working on a single
test we don't have to run them all,
-we can change protractor configuration, e.g. what browser to use for
testing or the order with which we want to run tests, and see results
without rebuild,
-we can change html views (since protractor works with html
elements it
can happen that we need to add tags to html files) and run the same
test
again.
To achieve this goals everything I did is
1. removing <skipTests>true</skipTests> from every plugins that
excecute pre-integration-test phase,
2. mvn -Pjrebel,
3. move to enduser-test.dir
4. write, modify tests or configuration files
5. copy updated test files in enduser-test.dir
6. delete test files I'm not interested to, from enduser-test.dir
7. run nodejs/node/node nodejs/bin/protractor protractor-conf.js
from enduser-test.dir
So I think a appropriate profile could be a solution. Changes I
made to
the pom is a quick solution to work temporarily.
If there is a mvn parameter to force building Syncope without skipping
pre-integration-test phase would be much quicker !
Matteo.
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/