GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Enable Java assertions in framework integration tests by dtim · Pull Request #539 · UnitTestBot/UTBotJava

Conversation

@dtim

@dtim dtim commented Jul 15, 2022

Copy link
Copy Markdown
Collaborator

Description

This PR adds the -ea command line for java invocation when an integration test is run. The test runner code is refactored: a list of additional arguments is added, and list builders are used instead of list concatenation during the command line construction.

As list builders are experimental in Kotlin 1.4.20, necessary @OptIn annotations and the corresponding compiler argument have been added. They will become obsolete upon transition to Kotlin 1.7.

Fixes #538

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Refactoring

How Has This Been Tested?

Automated Testing

A new test with assert statement was added to the utbot-framework test suite: org.utbot.examples.codegen.JavaAssertTest.

Manual Scenario

It is an infrastructural change, so no explicit manual checking is expected. To verify that the change works, it is necessary to add a test involving Java assert statement to the utbot-framework test suite.

Checklist (remove irrelevant options):

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • The change contains enough commentaries, particularly in hard-to-understand areas
  • New documentation is provided or existed one is altered
  • No new warnings
  • Tests that prove my change is effective
  • All tests pass locally with my changes

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dtim
Enable Java assertions in framework integration tests
6fc1d9b
Added "-ea" command line argument to the java invocation used to run
integration tests in `utbot-framework`.
@dtim
dtim requested a review from Damtev July 15, 2022 17:21
Damtev
Damtev approved these changes Jul 15, 2022
View reviewed changes
@dtim
dtim merged commit 9b95f55 into main Jul 15, 2022
@dtim
dtim deleted the dtim/538-assert-in-integration-tests branch July 15, 2022 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Damtev Damtev Damtev approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

UTBot Java
Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Integration tests in utbot-framework fail when assert is used in the Java code

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@dtim @Damtev
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.