[X2Go-Dev] Unit tests (was: Code formatting)

Mike Gabriel mike.gabriel at das-netzwerkteam.de
Thu May 21 08:27:08 CEST 2020


Hi Melroy,

On  Mi 20 Mai 2020 17:19:50 CEST, Melroy van den Berg wrote:

> Ps. Where are the testcases? We may need to start creating  
> (integration/unit) testcases to avoid regression issues when  
> changing code.

Most of the X2Go code components have been developed without unit  
tests. I can only speak for Python X2Go and X2Go Broker (as they are  
"my" projects).

When I started Python X2Go, I was a Python newby and did not know what  
unit tests were. Several times in the past I though, how cool it would  
have been to do atomic unit tests on code changes. It would have saved  
my a lot of trouble.

For X2Go Broker, I set up unit tests and several features (not full  
coverage, I guess) get tested and when I added new code, I offered 1-2  
unit tests with the code. However, checking full test coverage via a  
CI might be the next step here, too.

The problem is: where to start. I would _not_ start a CI test scenario  
where an X2Go client starts a session on some X2Go server and  
everything gets video recorded and analysed. This is skipping a step.

One starting point could be:

   libx2goclient (gtest based unit tests or similar)
   x2gothinclient (chroot setup of TCE)
   x2go-live (chroot setup of X2Go Live Image)
   x2goserver (start adding unit tests from scratch, in retrospective)

For libx2goclient, the unit tests can run at package build time. This  
can happen on the Jenkins server, we already have anyway.

The chroot setup tests must run in containers or VMs, I guess. For  
this we need a CI worker and a Git interaction that triggers those.  
This is awkward with the current state of the Git server (git push via  
SSH login on a plain file system).

Thus, one other first step would be e.g. a GitLab (or whatever Git  
web-based platform) setup. One that supports integrations of CI workers.

As you sound pretty enthusiastic about helping out with X2Go, be  
prepared to put time in any of the above tasks (or any other related  
task) without much man power coming along to assist you (because we  
are all lacking time, due to family life, work life, etc.).

However, I can offer expertise and background knowledge on X2Go  
development and the underlying communication between client and  
server, etc. If you want a quicker reply from me, put me in Cc: of  
your mails to the list (but don't drop the list from Cc:!!!).

Thanks + Greets,
Mike


-- 

DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: Digitale PGP-Signatur
URL: <https://lists.x2go.org/pipermail/x2go-dev/attachments/20200521/03cd8a28/attachment.sig>


More information about the x2go-dev mailing list