Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C6143200BCA for ; Mon, 21 Nov 2016 17:48:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C4931160AF9; Mon, 21 Nov 2016 16:48:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E8275160AEF for ; Mon, 21 Nov 2016 17:48:02 +0100 (CET) Received: (qmail 98237 invoked by uid 500); 21 Nov 2016 16:48:02 -0000 Mailing-List: contact dev-help@syncope.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@syncope.apache.org Delivered-To: mailing list dev@syncope.apache.org Received: (qmail 98226 invoked by uid 99); 21 Nov 2016 16:48:02 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2016 16:48:02 +0000 Received: from [192.168.0.7] (93-56-25-79.ip287.fastwebnet.it [93.56.25.79]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 6DC5C1A003E for ; Mon, 21 Nov 2016 16:48:01 +0000 (UTC) Subject: Re: [DISCUSS] Enduser Test Profile To: dev@syncope.apache.org References: <582F0E43.7080107@tirasa.net> <582F2CC7.2010209@tirasa.net> <4cabc434-7327-4fa4-9d40-33a1fb30edc0@typeapp.com> <94de9195-c645-b658-9274-a465635cae9a@apache.org> <583322D2.1@tirasa.net> From: =?UTF-8?Q?Francesco_Chicchiricc=c3=b2?= Message-ID: <008d088e-a579-9410-d027-66fa18ecd63d@apache.org> Date: Mon, 21 Nov 2016 17:47:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <583322D2.1@tirasa.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable archived-at: Mon, 21 Nov 2016 16:48:04 -0000 On 21/11/2016 17:37, Matteo Di Carlo wrote: > Hi, > here =20 > 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=20 > 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 profil= e. This breaks the current set up. The point is that enduser integration tests involves both propagation=20 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=20 preparation is run but execution is skipped - thus allowing for manual=20 tst execution against a fully-compliant test environment. Did I get it right? If so, you should not remove any line from the current=20 fit/enduser-reference/pom.xml but rather only add a new profile. HTH Regards. > On 21/11/2016 09:43, Francesco Chicchiricc=C3=B2 wrote: >> Matteo, >> please draft an updated >> >> fit/enduser-reference/pom.xml >> >> somewhere (gist, as suggested should be good enough) so that we can=20 >> 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=20 >>> 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=20 >>> 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=20 >>> system to startup, we have no granularity. It is not feasible while=20 >>> developing tests. We need to run single tests (while developing)=20 >>> against a running syncope environment (enduser ui + core), and at=20 >>> the moment AFAIK we are not able to run single tests through maven,=20 >>> we have to use js tools as Matteo said. >>> >>> =E2=80=8BBest regards, >>> Andrea >>> >>> Il giorno 18 nov 2016, 17:31, alle ore 17:31, Matteo Di Carlo=20 >>> ha scritto: >>>> >>>> On 18/11/2016 16:00, Francesco Chicchiricc=C3=B2 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 protracto= r, >>>>>> 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 test= s >>>>> 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=3DGroupITCase >>>>> >>>>> 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.di= r >>>> 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 fo= r >>>> testing or the order with which we want to run tests, and see result= s >>>> without rebuild, >>>> -we can change html views (since protractor works with html=20 >>>> 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 true 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.di= r >>>> 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=20 >>>> made to >>>> >>>> the pom is a quick solution to work temporarily. >>>> If there is a mvn parameter to force building Syncope without skippi= ng >>>> pre-integration-test phase would be much quicker ! >>>> >>>> Matteo. > --=20 Francesco Chicchiricc=C3=B2 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/