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

Enhanced validation with XML Schema and regression test suite #66

Merged
merged 1 commit into from
Sep 23, 2020

Conversation

qchaupds
Copy link

@qchaupds qchaupds commented Sep 9, 2020

Pull request to close issues #41 and #56 .

Summary*
The changes are to support two issues:

#41 Develop simple regression test suite for deployment
#56 validate the submitted OSTI record against a schema

Test Data and/or Report
One of the following should be included here:

  • Reference to regression test included in code (preferred wherever reasonable)
    The feature files for the 'behave' testing includes tables with input needed for the 'behave' testing. The .zip file (ATMOS_mpf_irtf_Bundles_20200414.zip) will need to be unzip and placed in the default run directory, with the top level directory aaDOI_production_submitted_labels.
  • Attach test data here + outputs of tests

How to run the unit tests:

    python3 pds_doi_core/actions/test/draft_test.py
    python3 pds_doi_core/actions/test/list_test.py
    python3 pds_doi_core/actions/test/check_test.py
    python3 pds_doi_core/actions/test/reserve_test.py
    python3 pds_doi_core/actions/test/release_test.py
    python3 pds_doi_core/util/test/doi_validator_test.py

How to run the behave test (assume the executable has been installed in user's directory and the behave command is in the path)

    behave --no-capture --no-logcapture >& temp_file.txt; tail -5 temp_file.txt

If everything is OK, you should see something like this at the end of temp_file.txt

2 features passed, 0 failed, 0 skipped
11 scenarios passed, 0 failed, 0 skipped
36 steps passed, 0 failed, 0 skipped, 0 undefined
Took 0m2.230s

If not, inspect the output file for where the error may have occurred.

Copy link
Member

@tloubrieu-jpl tloubrieu-jpl left a comment

Choose a reason for hiding this comment

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

I have many comments but the pull request is quite big...

Globally, I think the behave tests should be more homogeneous, maybe simplified.

Otherwise some comments on different things

Let me know if you have questions.

Thanks

config/conf.ini.default Outdated Show resolved Hide resolved
config/osti_release_input_schematron.xml Outdated Show resolved Hide resolved
pds_doi_core/actions/reserve.py Outdated Show resolved Hide resolved
pds_doi_core/actions/reserve.py Outdated Show resolved Hide resolved
pds_doi_core/outputs/osti_web_parser.py Outdated Show resolved Hide resolved
pds_doi_core/outputs/osti_web_parser.py Outdated Show resolved Hide resolved
pds_doi_core/outputs/osti_web_parser.py Outdated Show resolved Hide resolved
pds_doi_core/outputs/osti_web_parser.py Show resolved Hide resolved
pds_doi_core/outputs/osti_web_parser.py Outdated Show resolved Hide resolved
@jordanpadams jordanpadams changed the title #41 56 Enhanced validation with XML Schema and regression test suite Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants