Skip to content

Enables JUnit Jupiter best practices#11643

Merged
koppor merged 11 commits intomainfrom
introduce-junit5-best-practices
Aug 20, 2024
Merged

Enables JUnit Jupiter best practices#11643
koppor merged 11 commits intomainfrom
introduce-junit5-best-practices

Conversation

@koppor
Copy link
Copy Markdown
Member

@koppor koppor commented Aug 18, 2024

This enables JUnit Jupiter best practices

Two main changes:

(Follow-up to #11642)

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@koppor koppor added the dev: code-quality Issues related to code or architecture decisions label Aug 18, 2024
@koppor koppor changed the title Enables Enables JUnit Jupiter best practices Aug 18, 2024
@koppor koppor force-pushed the introduce-junit5-best-practices branch from 83d08f0 to 4227123 Compare August 18, 2024 11:28
@koppor
Copy link
Copy Markdown
Member Author

koppor commented Aug 18, 2024

Fetcher tests for quey transformation start to fail - need to investigate


org.jabref.logic.importer.fetcher.transformers.ArXivQueryTransformerTest
  Test convertYearRangeField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[2018]> but was: <Optional[all:2018]>

org.jabref.logic.importer.fetcher.transformers.CollectionOfComputerScienceBibliographiesQueryTransformerTest
  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[year:2018]> but was: <Optional[2018]>

org.jabref.logic.importer.fetcher.transformers.DBLPQueryTransformerTest
  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[2015]> but was: <Optional.empty>

  Test convertYearRangeField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[2012|2013|2014|2015]> but was: <Optional.empty>

org.jabref.logic.importer.fetcher.transformers.DefaultQueryTransformerTest
  Test convertYearRangeField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

org.jabref.logic.importer.fetcher.transformers.GVKQueryTransformerTest
  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[ver:2018]> but was: <Optional[pica.erj=2018]>

org.jabref.logic.importer.fetcher.transformers.JstorQueryTransformerTest
  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[sd:2018 AND ed:2018]> but was: <Optional[sd:2018 AND ed: 2018]>

org.jabref.logic.importer.fetcher.transformers.ScholarQueryTransformerTest
  Test convertYearRangeField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

  Test convertYearField() FAILED
  org.opentest4j.AssertionFailedError: expected: <Optional[]> but was: <Optional.empty>

@koppor koppor marked this pull request as draft August 18, 2024 11:37
@koppor
Copy link
Copy Markdown
Member Author

koppor commented Aug 18, 2024

OK, we forgot to add @Test annotations. The tests were never executed.

@koppor koppor mentioned this pull request Aug 18, 2024
6 tasks
@koppor koppor marked this pull request as ready for review August 18, 2024 22:51
@koppor koppor enabled auto-merge August 18, 2024 22:51
@koppor
Copy link
Copy Markdown
Member Author

koppor commented Aug 18, 2024

All should be good now. #11644 is kind of a pre-condition to get the OK checkmark for FetcherTests here, too.

@subhramit subhramit added the dev: testing Related to tests label Aug 19, 2024
@koppor
Copy link
Copy Markdown
Member Author

koppor commented Aug 19, 2024

All should be good now. #11644 is kind of a pre-condition to get the OK checkmark for FetcherTests here, too.

We merged - could not fix one test. This test is also red here, all others green. Thus, this is good to go.

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 19, 2024
@subhramit subhramit mentioned this pull request Aug 20, 2024
6 tasks
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 20, 2024

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

@koppor koppor added this pull request to the merge queue Aug 20, 2024
Merged via the queue into main with commit 5ec3ef2 Aug 20, 2024
@koppor koppor deleted the introduce-junit5-best-practices branch August 20, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev: code-quality Issues related to code or architecture decisions dev: testing Related to tests status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants