onestop

OneStop is a data discovery system being built by CIRES researchers on a grant from the NOAA National Centers for Environmental Information. We welcome contributions from the community!

This project is maintained by cedardevs

Testing Documentation Home

Estimated Reading Time: 25 minutes

Release Checklist

Table of Contents

Code Verification

  1. Update libraries to latest, if possible
  2. Run the full build (including tests): ./gradlew build
  3. Run gradlew dependencyCheckAnalyze --info to do OWASP security check
    • This runs nightly on the master branch.
  4. Ensure that included images are compressed in the git repo
  5. Run retire -p on the web-client code Retire JS. This runs as part of the client-checks job in every circle build.

Test Environment

Setup

  1. Deploy the latest master branch code to cedardevs demo site https://cedardevs.org/onestop
  2. Reset the indices and reload the data.
    • Check the logs, to make sure when ETL runs, 100% of the collections and granules make it into the search index (or document that those that do not are not expected to)

Verification

Reference Registry API for examples.

  1. Upload a test collection and granule.
  2. Retrieve the raw input from registry
    • ensure it returns a 200, and the content attribute contains the xml file you just uploaded
  3. Retrieve the parsed metadata
    • ensure it returns a 200, and that the discovery and analysis attributes contain values
  4. Delete the record
  5. Retrieve the raw input
    • ensure it returns a 404, with an error object explaining that it has been deleted
  6. Retrieve the parsed metadata
    • ensure it returns a 404, with an error object explaining that no parsed information exists
  7. Resurrect the record
  8. Retrieve the raw and parsed metadata again
    • ensure they behave like they initially did, above
  9. Verify in the OneStop UI you can find the details page for the collection and granule.

Browser Support and CSS

UI Behavior

Follow these steps to confirm that core behavior is working as expected, as well as verify 508 compliance with some quick checks.

  1. Open dev tools panel.
  2. Load the landing page.
    • The DEMO disclaimer appears at the top of the page, in red
    • Correct version number is displayed in the footer
    • Links in the header menu and footer work
    • Wave/ANDI automated 508 checks
  3. Go to the Help page
    • The quick help is still accurate
    • Wave/ANDI automated 508 checks
  4. Go to the About Us page
    • It lists expected number of collections (400+) and granules (50+)
    • Wave/ANDI automated 508 checks
  5. keyboard Return to the home page.
  6. mouse Click Weather under Popular Topics.
    • 20 results should be showing, with the option to show more
  7. mouse Click Show More Results
    • At the top, header is updated to reflect number of results shown
    • At the bottom, the show more button disappears when all results are loaded
  8. Return to the landing page using the back button
  9. keyboard Select Weather button again.
  10. keyboard Tab to and click the Show More Results button.
    • Keyboard focus is easy to track throughout the page
    • All the weather results show images (or a black overlay if there is a problem loading it - this is common in the test environment and doesn’t indicate a problem)
  11. mouse Open the filters for Keywords and Data Theme
    • At the top level, themes look approximately like: (exact values may have changed)
      • Agriculture (1)
      • Atmosphere (15)
      • Biological Classification (1)
      • Biosphere (1)
      • Climate Indicators (1)
      • Cryosphere (1)
      • Oceans (23)
      • Spectral/Engineering (1)
  12. keyboard Expand keywords Atmosphere > Atmospheric Winds > Surface Winds > U/V Wind Components
    • Tab to keywords, then navigate with arrow keys.
    • Each level is formatted correctly
    • keyboard Select this filter.
  13. mouse Expand Instruments.
    • Since the U/V Wind Components filter is on, some instruments listed have (0) results and are greyed out
    • Anemometers and MOCNESS Plankton Net have correct capitalization.
    • mouse Select these two options
    • Three applied filter bubbles should show above the results. Confirm all three are formatted correctly.
    • In the dev tools network tab, look for the last POST to /search/collection. The request payload should be: {"queries":[{"type":"queryText","value":"weather"}],"filters":[{"type":"facet","name":"science","values":["Atmosphere > Atmospheric Winds > Surface Winds > U/V Wind Components"]},{"type":"facet","name":"instruments","values":["ANEMOMETERS","MOCNESS > MOCNESS Plankton Net"]}],"facets":true,"page":{"max":20,"offset":0}}
    • Wave/ANDI automated 508 checks
  14. mouse Only one result should be showing. Select it.
    • URL changes to collections/details/UUID
    • Reloading the page or copying this URL into a new window loads the same view
    • This collection has 0 granules, so no link appears under Files
    • Time period on the summary tab is displayed as “1993-05-22 to 2006-12-02”
    • Bounding box on the summary tab is displayed as “Bounding box covering -172.99°, -78.652°, 113.3667°, 76.1552° (W, N, E, S).”
    • DSMM is displayed as “not available”
    • Access Tab should have sections for Information, Download Data, Search Data, Distribution Format. Only Download metadata should have a message such as “No links in metadata.”, the others should have specific information
  15. keyboard Tab to the summary tab, then to the Show All button underneath “Themes” and select it.
  16. mouse Click Show All button underneath “Instruments”.
    • All three keywords from the above filtering steps are displayed with the same formatting
  17. Go back to the search results and expand the themes and instruments filters again.
    • mouse remove one of the filters by clicking the x on the filter bubble
    • keyboard tab to another filter bubble and remove it
    • remove the last filter by unselecting the checkbox in the left-hand filter menu
    • the instruments list expands to include more options
    • toggle the U/V Wind Components filter on and off to see it grey out some instruments, then re-enable them when the filter is removed
  18. Go back to the landing page. Search for Tutuila. (There should be 4 results)
  19. Using the time filter, enter the start year 2010. (mouse click on the Apply button).
    • Results are filtered down to 2
  20. Remove the filter using the Clear button in the time filter form.
  21. keyboard Enter the end date 1990 April 9.
    • Results are filtered down to 3
  22. Enter the start year 2010 and apply the filter
    • A validation error displays
  23. Clear the filters. Select Pago Pago, American Samoa Tsunami Forecast Grids for MOST Model
    • on the Access tab, Information (and Download Data) says No links in metadata.
  24. In the header search bar, search for "southern alaska coastal relief". (There should be 1 result)
  25. keyboard Select this result
    • In the summary tab, location is “Bounding box covering 170°, 48.5°, 230°, 66.5° (W, N, E, S).”
    • In the map, the box is drawn around Alaska. (This renders across the dateline)
    • Access Tab should have sections Information, Download Data, Distribution Format. Note Search Data is not listed.
  26. Search for "GHRSST Level 4 ODYSSEA Mediterranean Sea Regional Foundation Sea Surface Temperature Analysis (GDS version 1)" and select the result.
    • Location reads “Bounding box covering -18.5°, 30°, 36.5°, 46.5° (W, N, E, S).”
    • Map image shows enclosed area of Mediterranean region in Europe. (This renders across the prime meridian)
    • The DSMM shows 2.5 stars
  27. Search for water. (There are over 300 results.)
    • mouse Using location filter, expand the map, draw a bounding box over the Mediterranean region. A new search triggers automatically. (There are less than 50 results - approximately 30)
    • keyboard In bounding box text fields, enter: -32, -1, 120, 60. (Similar number of results to above search, plus or minus a few).
    • The applied filter bubble updates the coordinates from the previous search to this one.
    • keyboard Apply the Exclude Global filter. This drops the result total by about half.
    • mouse Uncheck the Exclude Global checkbox.
  28. Enter bounding coordinates West: -191, South: 90, East: 90, North: 90
    • A validation error displays
  29. Delete the incorrect -191 but leave it blank and attempt to apply the filter.
    • A validation error displays
  30. Change the West value to foo
    • A validation error displays
  31. Search for tree rings. Select any of the paleo results.
    • The begin date shows with a negative year (eg -0106-01-01)
    • The date filter allows you to switch to “Geologic”, which provides options for:
      • CE vs BP year entry
      • start and end year
      • Eras
    • Enter -3.8 Ga to -1ka and apply. These are automatically changed to -3800000000 and -1000
    • change -1000 to -2ma. It is changed to -2000000 when applied.
    • change the start year to foo -> invalid start date.
    • change the start year to 2000 -> invalid year range.
    • Select the Era “Pliocene”
      • The range -5298050 to -2598050 is automatically applied and filled in
      • the URL encodes these as sy and ey
    • reload the page and reopen the date filter
      • Geologic is selected by default
      • Pliocene is still show under Eras
    • change the end year to 1950, Eras is reset to an empty value (no longer matches the range)
    • change
    • toggle CE to BP
      • The range displays as 5300000 to 0 (applied filters still show the CE values, clearly labeled as CE)
      • clearing the filters and toggling back and forth between CE and BP changes the placeholder value from -YYYYYYYYY (for CE) to YYYYYYYYY (for BP)
      • hovering over CE or BP will indicate what those are acronyms for
      • With BP set, selecting the Pliocene Era fills in the range 5300000 to 2600000 in the text boxes
    • switch back to the standard Datetime filter view.
      • A warning is displayed indicating that changes here will automatically remove the geologic filters
      • enter a datetime and confirm that the new datetime is applied and the CE years are removed
      • switching back to the Geologic view shows a comparable warning about removing datetime filters
      • selecting an era will likewise change the filters and clear the warning
    • note that most of the Era searches may not match any data
  32. Search for "NOAA/WDS Paleoclimatology - A global planktic foraminifer census data set for the Pliocene ocean". Select the result.
    • The date displays as “-617905000 to -1601050-12-31”
  33. Search glacier. Select the first result (not the Digital Elevation Model).
    • Point geometry is rendered as “Point at -49.815°, 69.222° (longitude, latitude)”
    • Map displays a point in Greenland on the map
    • Only one instrument is listed (no “Show All” button)
  34. Search "WATER TEMPERATURE and other data from LITTLE ROCK".
    • The result card show in a map, since there is no thumbnail image.
    • Select the result.
    • In the description area, it reads “No description available” and there is no image where most other collections have one.
    • Line geometry is rendered as “Line from -7.7°, 51.5° (WS) to -7.7°, 51.6° (EN).”
    • Zoom in on the map to see that it is correctly displaying as a line.
  35. Search suvi. Select the result with 6 solar images in the graphic.
    • No spatial bounding provided. World map is shown with no red bounding box.
    • Videos tab exists
    • Themes has only 3 keywords, and no show all link
    • Instrument and platforms both say ‘none provided’
  36. Search co-ops
    • filter the results with start date 2017
    • and select the “Coastal meteorological and water temperature data from National Water Level Observation Network (NWLON)…” result.
    • Files section has a link indicating the collection has “10 matching of 22 total files” (wording TBD)
    • Wave/ANDI automated 508 checks
    • This collection has no end date, so displays as “2013-03-01 to Present”
    • keyboard Navigate to the Access Tab.
    • It has sections for Information, Download Data, Search Data, Distribution Format. All are populated
    • mouse Click Show 10 of 22 matching files (wording TBD)
    • 10 granules are shown, with a applied filter indicating the 2017 start date has carried over from the collection search. Remove the filter.
    • Use the browser back button to go back to before the collection search, then the forward button to return to this page in the history to confirm that no weird loading things prevent that from working.
    • Wave/ANDI automated 508 checks
    • 20 granules are shown, with a “show more” button at the bottom to load the rest
    • each granule has a map with a point shown
    • each granule has FTP, HTTP, and several THREDDS links
    • each granule has service links listed
    • granules in both 2016 and 2017 are listed
    • filter granules with search 177000* and 1770000. Both should match 2 files. Applied filter bubble should read Filename Contains: [search term].
    • filter granules with search 177000 - should match zero files.
    • clear the filters
    • apply location: 166, -25, -135, 35 - (18 results)
    • draw on the location filter a box containing all of the pacific ocean - it should match all 22 results (or draw it smaller to get various subsets)
    • clear the filters
    • apply the facet Link Protocols UNIDATA:THREDDS (20 results)
    • clear the filters
    • apply the facet Data Center - Tidesandcurrents.Noaa.Gov (2 results)
    • above the granule list is a link back to the collection. click it. It should take you back to the details page with no filters applied
  37. Search ghrsst viirs ACSPO. The first or 2nd result should be “GHRSST GDS2 Level 2P Global Skin Sea Surface Temperature from the Visible Infrared Imaging Radiometer Suite (VIIRS) on the Suomi NPP satellite created by the NOAA Advanced Clear-Sky Processor for Ocean (ACSPO) (GDS version 2)” (orange image)
    • this result can also be found with fileIdentifier:"gov.noaa.nodc:GHRSST-VIIRS_NPP-OSPO-L2P"
    • Select this collection
    • Citation info is listed (expand Citation)
    • Identifier(s) section lists gov.noaa.nodc:GHRSST-VIIRS_NPP-OSPO-L2P and a doi link
    • keyboard Select the show matching files link
    • Files with a variety of bounding boxes appear
    • Access Protocols show Download, FTP, OPeNDAP, THREDDS and Web
  38. Search DEM. One of those should be “Hilo, Hawaii 1/3 arc-second DEM”
    • Select this collection
    • On the Access Tab, there should be a ‘Services’ section. It has 3 categories with map services (2 links), “Model Global Mosaic ArcGIS” image services (3 links), and “MHW Mosaic ArcGIS” image service (1 link) respectively.
  39. Search Constructed and look for the test data.
    • Navigate through to the granules page.
    • The granule “Test Accessible Access Protocols and Links” has 4 links
    • for all links, the protocol name is displayed on mouse hover
    • using a screen reader, or ANDI, verify the link titles match the format “[link text] protocol [protocol name] for [granule title]” if the link has a name rendered (2 links), or “[protocol name] for [granule title]” if the link has no name and uses the protocol as a fallback (2 links)
      • One each of the HTTPS and Cloud links matches each format. The two different examples of protocols used verifies the badge works correctly for both letter abbreviations (“H”) rendered with a span, and svg badges.
    • Add this granule to the cart. Assuming it’s the only granule in the cart, the select should have:
      • Under HTTPS:
        • Link with title (1 link)
        • HTTP/HTTPS (1 link)
      • Under CLOUD:
        • Cloud link with title (1 link)
        • Cloud File Access (1 link)
  40. Search OKEANOS EXPLORER and select the ROV dive-related multimedia and information collection. Go to the granules page.
    • Granules allow you to play the preview video inline.
    • each granule has service links “None available”
    • If added to the cart, the granules do not show the preview video ability.
  41. In the search box:
    • Enter a search with blank text field (disallowed)
    • Enter a search starting with * (disallowed)
    • Enter a search starting with ? (disallowed)
    • Enter a search with an escape character \ or /. The error page is shown due to a parsing error.

Live Docs Pages

OneStop’s API has several OpenAPI docs hosted on SwaggerHub. When performing a release you should regenerate these, with appropriate release number, and upload them to SwaggerHub.

Tips:

Generate Registry API OpenAPI Yaml

  1. Modify the template: registry/src/main/resources/openapi_base.yaml
    • At minimum change the info.version to this release number (Ex: “3.0.0-RC1”)
  2. Execute ./gradlew registry:clean build to trigger the task that will generate the $buildDir/resources/main/static/openapi.yaml
  3. Open the generated openapi.yaml file and verify the modified fields are correct.

Generate Search API OpenAPI Yaml

  1. Modify the template: search/src/main/resources/static/openapi.yaml
    • At minimum change the info.version to this release number (Ex: 3.0.0-RC1), noting the lack of quotations.
  2. Execute ./gradlew search:clean build to trigger the task that will generate the $buildDir/resources/main/static/openapi.yaml
  3. Open the generated openapi.yaml file and verify the modified fields are correct.

Update SwaggerHub Docs

  1. Log into SwaggerHub via credentials listed in the vault encrypted secretpassword file in the help repository.
  2. Create a new API docs for this release by importing each API’s openapi.yaml. If this is unclear SwaggerHub has great tutorials and documentation.
  3. Input fields:
    • Owner: cedarbot
    • Visibility: Public
    • Verify the Version field is what we changed it to.
    • Name: OneStop-Registry
  4. Update the OneStop docs to include new URLs. Example locations: OneStop root readme, within the API docs, and any other locations where SwaggerHub is referenced.

Example of resulting SwaggerHub doc URLs:

https://app.swaggerhub.com/apis/cedarbot/OneStop-Registry/3.0.0-RC1

https://app.swaggerhub.com/apis/cedarbot/OneStop-Search/3.0.0-RC1

Sitemap

Data we should identify or add to the test set:


Top of Page