[MGNLTEST-56] Enable "Docker-hybrid-setup" to run UI-tests locally Created: 26/Feb/20  Updated: 07/Jul/20  Resolved: 25/May/20

Status: Closed
Project: Magnolia Test Framework
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Christoph Meier Assignee: Rishab Dhar
Resolution: Fixed Votes: 0
Labels: QA&Testing, ease-of-usage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File ui-test-hybrid.png    
Issue Links:
Relates
relates to MGNLTEST-54 VncSideKickContainer startup failure ... Closed
relation
is related to MGNLTEST-40 Ensure UI/int test are easy to execut... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Release notes required:
Yes
Date of First Response:
Epic Link: core-TF-features-bugs-improvements
Story Points: 8

 Description   

The "Docker-hybrid-setup" - aka "Dai's hybrid setup" is setup to run integration and UI tests on a local laptop.

The setup is used / developed by Dai so far, it has been discussed during the Workshop - Running UI tests locally and has been considered to be a "better" setup compared to the so far docker-setup, and the Group of Interest for QA&Testing has decided to enable this scenario making it available for the developers in an "easy way".

Overview of the "Docker-hybrid-setup"

  • Webapps are started via IDE and run on the host.
  • Only the selenium server runs in the docker container.
  • Test are launched from the host

 

 

Gains:

  • Less resource consumption on the docker side
  • No more time-consuming "downloads" on the docker side to fetch the webapps -> generally much quicker
  • Webapps started via IDE can be debugged too.

To compare, here are the other, already available setups:

  • the "all-docker-scenario": Both webapps and selenium server run in docker.
  • "fully-local setup": everything runs onthe host
  • "Linux-VM-setup": VM runs the selenium server; webapps started by IDE run on host.

Tasks

  • Refactor the "set-up script" localtest.sh to enable the "Docker-hybrid-setup"
  • Refactor "framework classes" if required
  • Update the docu on bitbucket giving all necessary info in order to understand and use this new setup variation

Acceptance critera

  • Clarify how to run the hybrid setup, and what runs where
    • Update some meaningful defaults (e.g. flag to kill containers when tests start, other?)
      • special attention to the sever ports (should probably revert from custom ones like 8599 in favour of more traditional 8080)
      • re-consider setup.test.env default (should not matter much though since the proposed approach doesn't imply server deployment in container)
  • Produce just-enough README, can be built upon for bigger-audience workshop
  • Consider retiring existing scripts (or keeping them/deprecate for change-averse people)
  • Adapt
    • 1st on CE
    • 2nd on dx-core
  • Do it on master only / no need to backport atm
  • Consider follow-ups for additional local, persistent env config by file

Note that the "fully local" setup currently does not work when running tests which use the new ui-test-fwk.
That's not ideal, but fixing this is not within the scope of this ticket.

 

To be defined

Since we already know, that the current setup of Dai needs "quite a lot" (4?) params which must be passed when launching a test, we hopefully can reduce this to a "minimum" ... but let's see.

 



 Comments   
Comment by Christoph Meier [ 26/Feb/20 ]

I'm aware of that this one is clearly related to DEV-1200 and, if tackled properly, at least partially resolves what is demanded in DEV-1200.
Let's tackle this one 1st, then decide what still must be done on DEV-1200 and what can be skipped.

Comment by Christoph Meier [ 27/Feb/20 ]

There is a branch on my fork with some work in progress.
See https://git.magnolia-cms.com/users/cmeier/repos/ce/commits?until=refs%2Fheads%2FDEV-1471 
It contains a so far working solution for CE, but there are still things missing such as:

  • Currently no vids are stored on test failure
  • Simplify Parameter handling

There also have a few comments from Sasha on the fork proposing improvements.

Comment by Rishab Dhar [ 25/May/20 ]
  • Hybrid docker + full docker setup works now without requiring any further developer configuration
  • Customizable .env for configuring local docker setup if required
  • Fully local setup (non-dockerized) works as well now with sane defaults, without requiring any developer configuration
  • Code refactoring and cleanup
  • Improve JUnit 5 setup (single webdriver instance to trigger UI tests on selenium and prevent memory leaks)
Comment by Christoph Meier [ 26/May/20 ]

All 3 scenarios work on dx-core, too.

Ticket can be closed.

Generated at Mon Feb 12 07:45:08 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.