Detecting servoy errors / warnings

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Detecting servoy errors / warnings

Postby robrecht » Mon Nov 13, 2017 11:27 am

Hi

Is it possible to check if an active servoy solution contains errors / warnings ?
I would like to use such a method to let the unit tests fail when there are errors or warnings.

Thanks
Robrecht
robrecht
 
Posts: 88
Joined: Wed Aug 01, 2012 4:30 pm

Re: Detecting servoy errors / warnings

Postby Andrei Costescu » Mon Nov 13, 2017 1:11 pm

You are talking here about automated unit tests right?

The solution exporter used for that already fails for Servoy build errors.
However it doesn't have an option to fail exporting for warning markers as well nor does it run the DLTK/JS build to check for scripting errors.
If you want/need any of the two above that you should create a case or cases.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 934
Joined: Tue Jun 26, 2007 3:14 pm

Re: Detecting servoy errors / warnings

Postby robrecht » Mon Nov 13, 2017 1:26 pm

Yes I mean the automated test.
But I was thinking about a method to get all warnings/errors with a description so we could use this information to send an e-mail or print an overview
You think that might be possible? Then I'd be happy to create a change request

Thanks
robrecht
 
Posts: 88
Joined: Wed Aug 01, 2012 4:30 pm

Re: Detecting servoy errors / warnings

Postby Andrei Costescu » Mon Nov 13, 2017 4:17 pm

The exporter (build output will contain this) lists those after "Found error markers in solution (...)" or "Found warning markers in projects for solution (...)".
So if the exporter would fail sending that last part of the build output would also include those.

Or do you have something else in mind?
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 934
Joined: Tue Jun 26, 2007 3:14 pm

Re: Detecting servoy errors / warnings

Postby pbakker » Thu Nov 16, 2017 1:53 pm

Robrecht,

Are you talking about errors in the log after the testrun while the test in which it occurred didn't fail?

We used to use Jenkins where you have log parser plugins what you can instruct to find all log entries based on certain patterns and depending on the pattern fail the build.

Currently we are using GitLab CI where we unfortunately don't have such a mechanism yet
pbakker
 
Posts: 2821
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: Detecting servoy errors / warnings

Postby Andrei Costescu » Thu Nov 16, 2017 2:29 pm

I am talking about lines of text in the console of the job (so what is in Jenkins under the job run's "Console output"). So not in the developer .log or app. server servoy_log.txt but really the output of the job.
Those already appear like that for Servoy build errors and warnings, but currently only errors can fail the export (warnings are just logged but don't fail) and there is no check for javascript errors as I already mentioned. If you want the possibility to fail export - so job - even for warnings and also check for JS errors you should make a case.

Not sure where the equivalent of "Console output" appears in GitLab CI. But the basic idea should be the same.

What I was suggesting was that you don't even parse that output - just send the email with that output when job fails; at least that was easy to do in Jenkins. Of course if you can parse it as you used to and show problems nicer it's a plus...
That was my question: are you thinking of a nicer way to report these? Is it worth it?

PS: If you want to fail your job for warning markers - without any case to change Servoy then yes you'd need to parse the output and search for warnings yourself...
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 934
Joined: Tue Jun 26, 2007 3:14 pm


Return to Programming with Servoy

Who is online

Users browsing this forum: andre1506345542, Bing [Bot] and 4 guests