Skip to content

Testability: add log records on test generation phases #1122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alisevych opened this issue Oct 10, 2022 · 6 comments · Fixed by #1547
Closed

Testability: add log records on test generation phases #1122

alisevych opened this issue Oct 10, 2022 · 6 comments · Fixed by #1547
Assignees
Labels
comp-logging Issue is related to Logging ctg-enhancement New feature, improvement or change request

Comments

@alisevych
Copy link
Member

alisevych commented Oct 10, 2022

Description

In order to check phases and their duration we need to have log info records.
Currently we can measure only overall test generation process.
It's needed to analyze which phase is time consuming.

Expected behavior

Add info log records for different phases of UnitTestBot test generation.

  • Test generation initiated
  • Collecting information (classes)
  • Fuzzing phase
  • Symbolic analysis phase
  • Minimization
  • Summaries
  • Code generation

Environment

IntelliJ IDEA (probably add records to idea.log?)

Potential alternatives

or separate UnitTestBot log ?

Context

Originally posted by @alisevych in #1028 (comment)

@alisevych alisevych added ctg-enhancement New feature, improvement or change request ctg-qa Issue is related to QA process labels Oct 10, 2022
@korifey korifey moved this to Todo in UTBot Java Oct 10, 2022
@alisevych alisevych added this to the 2022.11 Release milestone Oct 14, 2022
@Vassiliy-Kudryashov
Copy link
Member

Seems to be fixed in branch Vassiliy-Kudryashov/IDEA_hangs_during_test_generation_#1207

@Domonion
Copy link
Collaborator

Domonion commented Nov 21, 2022

New log system description

Based on meeting with @korifey and @alisevych

Target users for whom it should be convenient:

  1. Developers - runIde - utbot-intellij/log4j2.xml
  2. QA - built plugin - settings from ~/.utbot/settings.properties
  3. User scenario logs - built plugin- ~/.utbot/settings.properties

Settings from utsettings:

  1. Log level for concrete executor
  2. Log config path for engine and concrete executor

Requirements:

  1. Users should not send full utbot directory in issue - only useful logs from engine, idea and related concretes
  2. Always logs for concrete, engine and idea
  3. Info by default
  4. Easy to lift loglevel to debug/trace - using ~/.utbot/settings.properties
  5. Easy to navigate to log files
  6. Do not use console appender as it pollutes stdout and slows os - use file everywhere. Most probably RollingFileAppender.
  7. For each concrete executor it should be easy to deduce from which moment in engine process this concrete executor
    was started - from fuzzing/concrete and/or flex
  8. Docs about all logging settings and example of usages
  9. Navigation from one logfile to another should be easy - for example by click as in Rider
  10. May be idea debug log for changing plugin log4j2.xml without rebuilding plugin
  11. Concrete executor prints log to stdout which is redirected to file, may be better to file directly

Useful:

  1. parralel generations are prohibited! - file appender is suitable

@alisevych
Copy link
Member Author

alisevych commented Nov 21, 2022

Additional information

Requirements

  1. Users cannot upload files to GitHub via browser larger than 25MB
    It can be LOG or ZIP - here is the github docs
    If files were larger, a workaround - Dropbox for example - would be needed.

@Domonion
Copy link
Collaborator

Domonion commented Nov 30, 2022

Discussed with @alisevych:
It is required to add more entries about phases execution, at least to indicate when each phase started and ended.

AFAIK following people should be notified:
@amandelpie @Vassiliy-Kudryashov @Markoutte @EgorkaKulikov

In case you need help with current logging - see doc and ask me

@denis-fokin
Copy link
Collaborator

As far as most work is delivered to master. The rest will complete in future release.

@denis-fokin denis-fokin removed this from the 2022.12 Release milestone Dec 21, 2022
@amandelpie
Copy link
Collaborator

The logging for summaries was not implemented

@amandelpie amandelpie removed their assignment Jan 18, 2023
@alisevych alisevych self-assigned this Jan 19, 2023
@alisevych alisevych added the comp-logging Issue is related to Logging label Jan 19, 2023
@alisevych alisevych removed the ctg-qa Issue is related to QA process label Jan 19, 2023
@EgorkaKulikov EgorkaKulikov removed their assignment Jan 23, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in UTBot Java Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-logging Issue is related to Logging ctg-enhancement New feature, improvement or change request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants