Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Add traces when a test case is starting and ending #113

Open
Sgitario opened this issue Nov 17, 2020 · 3 comments
Open

Add traces when a test case is starting and ending #113

Sgitario opened this issue Nov 17, 2020 · 3 comments

Comments

@Sgitario
Copy link
Contributor

Sgitario commented Nov 17, 2020

At the moment, this information is logged only in the OpenShiftTests, see line:

System.out.println(ansi().a("---------- running test ")
                .fgYellow().a(context.getParent().map(ctx -> ctx.getDisplayName() + ".").orElse(""))
                .a(context.getDisplayName()).reset().a(" ----------"));

We should refactor this to have only one JUnit extension that needs to be run for both OpenShiftTests and QuarkusTest.

Moreover, we should use the logger instead System.out.

@Ladicek
Copy link
Contributor

Ladicek commented Nov 18, 2020

In fact, I think System.out is a better choice for this test suite, because:

  1. We don't have any use for any feature of any logging system.
  2. We don't want to confuse logging output of test applications with logging output of tests.
  3. We can add colors :-)

@Sgitario
Copy link
Contributor Author

In fact, I think System.out is a better choice for this test suite, because:

  1. We don't have any use for any feature of any logging system.
  2. We don't want to confuse logging output of test applications with logging output of tests.
  3. We can add colors :-)

I strongly disagree:

  1. With a proper logging, It's much easier to troubleshot issues which is very necessary for a test suite (we can turn on/off the traces we want to see, for example).
  2. Sorry, I don't fully understand this statement. But we can redirect any traces to be written in the Console plus one file, or directly to another file. It would be only a matter of configuration.
  3. We can get colours too! :)

@Ladicek
Copy link
Contributor

Ladicek commented Nov 18, 2020

We sure need proper logging for test applications. For the test framework and tests themselves -- I doubt it. That's why I went with plain old stdout. But if you can demonstrate where proper logging would be useful, then sure, let's use it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants