syncope-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matteo Di Carlo <matteo.dica...@tirasa.net>
Subject Re: [DISCUSS] Enduser Test Profile
Date Fri, 18 Nov 2016 16:31:03 GMT


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.



Mime
View raw message