Skip to content
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

Streamline test output #10762

Merged
merged 3 commits into from
Jan 9, 2024
Merged

Streamline test output #10762

merged 3 commits into from
Jan 9, 2024

Conversation

koppor
Copy link
Member

@koppor koppor commented Jan 9, 2024

Our fetcher tests output the test results twice:

> Task :fetcherTest
org.jabref.logic.importer.fetcher.ACSTest

  Test findByDOI() FAILED

  org.opentest4j.AssertionFailedError: expected: <Optional[https://pubs.acs.org/doi/pdf/10.1021/bk-2006-STYG.ch014]> but was: <Optional.empty>


ACSTest > findByDOI() FAILED
    org.opentest4j.AssertionFailedError: expected: <Optional[https://pubs.acs.org/doi/pdf/10.1021/bk-2006-STYG.ch014]> but was: <Optional.empty>
        at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)

This was unreadable.


We have the plugin gradle-test-logger-plugin enabled for that. Today, I found the solution (refs radarsh/gradle-test-logger-plugin#252 (comment)).

Configure the plugin correctly :)


New output (excerpt)

  Test findManyEntries() FAILED (1.2s)

  org.jabref.logic.importer.FetcherException: Error while fetching from Google Scholar


org.jabref.logic.importer.fetcher.GrobidCitationFetcherTest

  grobidPerformSearchCorrectResultTest(String, BibEntry, String)

    Test example1 FAILED (42.2s)

    org.opentest4j.AssertionFailedError: expected: <[@article{-1,
      author = {Derwing, Tracey and Rossiter, Marian and Munro, Murray},
      date = {2002-09},
      doi = {10.1080/01434630208666468},
      journal = {Journal of Multilingual and Multicultural Development},
      month = {9},
      number = {4},
      pages = {245-259},
      publisher = {Informa UK Limited},
      title = {Teaching Native Speakers to Listen to Foreign-accented Speech},
      volume = {23},
      year = {2002},
      _jabref_shared = {sharedId: -1, version: 1}
    }]> but was: <[]>

Follow-up to #5676.


The output of org.jabref.logic.l10n.LocalizationConsistencyTest#findMissingLocalizationKeys is still showing instructions (in IntelliJ)

DETECTED LANGUAGE KEYS WHICH ARE NOT IN THE ENGLISH LANGUAGE FILE
PASTE THESE INTO THE ENGLISH LANGUAGE FILE

%0\ matches\ the\ term\ <b>%1</b>=%0 matches the term <b>%1</b>

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.

Copy link
Contributor

github-actions bot commented Jan 9, 2024

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

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jan 9, 2024
@Siedlerchr
Copy link
Member

lgtm

@Siedlerchr Siedlerchr added this pull request to the merge queue Jan 9, 2024
Merged via the queue into main with commit 01c3e15 Jan 9, 2024
18 of 19 checks passed
@Siedlerchr Siedlerchr deleted the improve-test-logging branch January 9, 2024 15:59
@koppor koppor mentioned this pull request Jan 11, 2024
6 tasks
Siedlerchr added a commit that referenced this pull request Jan 12, 2024
* upstream/main: (25 commits)
  Remove remainging "testLogging" (#10769)
  Reuse JUnit 5.7's @DisabledIfEnvironmentVariable (#10768)
  Refactored LibraryTab (#10732)
  Fix annotation (#10766)
  Add initial .git-blame-ignore-revs (#10765)
  Streamline test output (#10762)
  Fix NPE when opening and re-opening a library (#10763)
  Changed default status of 'Automatically open folder of attached files' (#10748)
  Implement test cases for search (#10193)
  Add cites field to bib entries for citation relation (#10752)
  Ignore submodule changes (for normal devs) (#10754)
  Fix line endings
  Bump lycheeverse/lychee-action from 1.8.0 to 1.9.0 (#10760)
  Bump appleboy/ssh-action from 1.0.2 to 1.0.3 (#10761)
  Bump org.apache.lucene:lucene-core from 9.9.0 to 9.9.1 (#10759)
  Bump org.openrewrite.rewrite from 6.5.4 to 6.6.3 (#10758)
  Bump org.glassfish.jersey.containers:jersey-container-grizzly2-http (#10755)
  Bump org.jsoup:jsoup from 1.16.2 to 1.17.2 (#10756)
  Bump org.mockito:mockito-core from 5.7.0 to 5.8.0 (#10757)
  Remove abstract
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants