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

Add testing.yaml testing workflow #539

Closed
1 of 24 tasks
JohnHalleyGotway opened this issue Jul 5, 2024 · 1 comment · Fixed by #548
Closed
1 of 24 tasks

Add testing.yaml testing workflow #539

JohnHalleyGotway opened this issue Jul 5, 2024 · 1 comment · Fixed by #548
Assignees
Labels
alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle alert: NEED MORE DEFINITION Not yet actionable, additional definition required component: testing Software testing issue priority: high High Priority requestor: METplus Team METplus Development Team type: new feature Make it do something new

Comments

@JohnHalleyGotway
Copy link
Contributor

JohnHalleyGotway commented Jul 5, 2024

Describe the New Feature

Other METplus components include an automated testing.yaml testing workflow that's run through GitHub actions for each Pull Request. Recommend adding this automated testing for METviewer as well with logic very similar to the logic in METplus and MET.

This is related to work will help with issue: https://github.com/dtcenter/METplus-Internal/issues/36

Many more details need to be added here.

Acceptance Testing

List input data types and sources.
Describe tests required for new functionality.

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the new feature down into sub-issues.

  • *Determine where JUnit tests are located *
    - [ ] If JUnit tests do not exist, create them
  • *Run the JUnit tests, if found within the IDE and from command line. *
  • Incorporate these tests into a Github Action workflow, leveraging any existing "base" workflows in the Github Marketplace, if possible

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Review default alert labels
  • Select component(s)
  • Select priority
  • Select requestor(s)

Milestone and Projects

  • Select Milestone as a METviewer-X.Y.Z version, Consider for Next Release, or Backlog of Development Ideas
  • For a METviewer-X.Y.Z version, select the METviewer-X.Y.Z Development project

Define Related Issue(s)

Consider the impact to the other METplus components.

New Feature Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issue
    Select: Milestone as the next official version
    Select: METviewer-X.Y.Z Development project for development toward the next official release
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added type: new feature Make it do something new priority: high High Priority component: testing Software testing issue alert: NEED MORE DEFINITION Not yet actionable, additional definition required alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle requestor: METplus Team METplus Development Team labels Jul 5, 2024
@JohnHalleyGotway JohnHalleyGotway added this to the METviewer-6.0.0 milestone Jul 5, 2024
@bikegeek bikegeek self-assigned this Aug 22, 2024
@bikegeek
Copy link
Collaborator

Found junit tests in the java/edu/ucar/metviewer/test directory:

  • AllTestRunner.java
  • ComparePlotBatchTest.java
  • CreatePlotBatchTest.java
  • MVBatchTest.java

and
AllTestCompare.java (created by NOAA contributor)

Determine how to run these tests then incorporate them into a Github action.
NOTE running this within the IntelliJ IDE has highlighted that JUnit 3.8 or above is required for running these tests.

@bikegeek bikegeek changed the title Add testing.yml testing workflow Add testing.yaml testing workflow Aug 29, 2024
bikegeek added a commit that referenced this issue Sep 13, 2024
@bikegeek bikegeek linked a pull request Sep 17, 2024 that will close this issue
14 tasks
bikegeek added a commit that referenced this issue Sep 18, 2024
* added the test.yaml for initial JUnit tests and changed filenames of the other GHA workflow files to conform with the rest of METplus

* Issue #539 add this jar to enable GHA to run junit

* Issue #539 including the edu/ucar/metviewer/test/mvutil/*.java to the target "compile-all"

* Test if junit command works

* Fixed syntax error

* Added test-compile and test to facilitate JUnit4 tests

* Use test-compile and test target in the command

* use ant test command instead of java -jar to run junit test

* fix lib to ${lib} for junit jar and modify some paths for the test build dir

* modify the ant command to run the test

* remove incorrect/unused ant command for compiling tests

* explicitly point to the MVUtil tests

* experiment with running the junit-platform-console-standalone jar

* Separate the first run command into building the tests

* Added some useful comments, cleaning up

* Simple JUnit test and runner used to create the test.yaml GHA workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle alert: NEED MORE DEFINITION Not yet actionable, additional definition required component: testing Software testing issue priority: high High Priority requestor: METplus Team METplus Development Team type: new feature Make it do something new
Projects
Status: 🏁 Done
Development

Successfully merging a pull request may close this issue.

2 participants