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

[nasa/nos3#228] System Testing Initial Setup #566

Merged
merged 23 commits into from
Mar 26, 2025
Merged

Conversation

kevincbruce
Copy link
Contributor

Added Test Suites and the necessary basic folders and file stubs to COSMOS and all components. Implemented working and complete test suites (LPT and CPT, identical if no functions require user input) for Sample and Generic_FSS. Sample CPT shows how to take input into a test and then automatically check without needing user to verify further. FSS shows how to check component sensor data values against Truth Values. Also contains a basic system-wide LPT stack that can be loaded into YAMCS.

How to Test:

  • Modify top level config to use the cosmos gsw
  • make clean, make, make launch
  • Open COSMOS launcher, click the COSMOS button, once windows spawn click Test Runner, then okay on the dialog that pops up
  • Verify that under the top dropdown in test runner (Test Suites), that there are test suites for Mission and each component.
  • Go to the Sample_Test test suite, and hit run next to the test suite. Wait for it to run, and enter a number for the config command when prompted by the CPT script.
  • Go to the Fss_Test test suite, and hit run next to the test suite. Wait for it to run successfully (LPT and CPT here are the same, as there are no commands for FSS that take user input).

Optional

  • Switch config back to yamcs
  • make clean, make, make launch
  • Go to the stacks page in YAMCS (I believe under procedures?), and then click to load a file, and load the LPT.ycs file from your top level nos3 directory
  • Hit run all steps, and verify it runs through correctly, and that values eventually show up in all the check stages of the stack.

Submod Merges:
nasa-itc/gsw-cosmos#22
nasa-itc/arducam#11
nasa-itc/generic_adcs#12
nasa-itc/generic_css#10
nasa-itc/generic_eps#12
nasa-itc/generic_fss#8
nasa-itc/generic_imu#9
nasa-itc/generic_magnetometer#9
nasa-itc/generic_radio#9
nasa-itc/generic_reaction_wheel#11
nasa-itc/generic_star_tracker#3
nasa-itc/generic_thruster#3
nasa-itc/generic_torquer#10
nasa-itc/novatel_oem615#11
nasa-itc/sample#27

Tied to #228, but does not close, as more subissues must be made and closed for each component's system test suite implementation, and updating any top level LPT/CPT, and making a cFE/cFS LPT and CPT.

…ck why device counter is incrementing on failed commands (e.g. redundant enable). Added stubs for each component test suite so that test runner will launch and does not crash (will if missing)
…bing FSS to show comparing component data with 42 data for verification
@codecov-commenter
Copy link

codecov-commenter commented Mar 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.82%. Comparing base (1b52bab) to head (8a85921).
Report is 57 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #566      +/-   ##
==========================================
+ Coverage   72.77%   72.82%   +0.05%     
==========================================
  Files         744      745       +1     
  Lines       91191    91497     +306     
  Branches     6923     6942      +19     
==========================================
+ Hits        66362    66636     +274     
- Misses      24829    24861      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@zlynch2 zlynch2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested both sample and fss test scripts, both passed. Also verified we had a test suite for each component. Approving.

Some cleanup could include:
when running the sample test, What possible values to enter for sample config command, we ask for input but we should give the user options as to what needs to be entered.

@kevincbruce
Copy link
Contributor Author

Understood. May make a variant of LPT that has a hardcoded value to test config, if desired. As for the current, can be any int. As far as I am aware, config doesn't do anything. Could expand the prompt though, if it is unclear. John wanted to review before I merge, so I can check that first.

…g prompt in sample cpt, and added hardcoded value config test to sample LPT
@kevincbruce
Copy link
Contributor Author

Responded to Zach's comment, and verified it still works for me.

Copy link
Contributor

@jlucas9 jlucas9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@kevincbruce kevincbruce merged commit f20ab80 into dev Mar 26, 2025
3 checks passed
@jlucas9 jlucas9 deleted the nos3#228-system-testing branch March 26, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants