Adding a New Test - RSGInc/DaySim GitHub Wiki

The steps to add a new test (i.e. region with tests) are below.

Create repository

  • Create a private GitHub repository call something like 'region_daysim_test'.

Commit inputs and outputs

  • Confirm that the setup works with the latest Daysim build before pushing it to GitHub!
  • Daysim needs to be run from the same folder as the configuration file
  • Name the configuration file something like configuration_regress.properties
  • Set a small sample rate (the Azure test defaults to 1/10,000) so the test runs faster than a model run
  • Build and run DaySim using your inputs and save the outputs to their own folder in the repository.
  • Commit all inputs required to run Daysim; you will likely need Git LFS
  • Commit all outputs from your run since these are used for testing - both outputs and working

Add Test to DaySim

  • Clone DaySim and create a new test branch. Include the keyword azure in your branch name to trigger the test system.
  • Add your test to the Azure YAML file. Be sure to give Ben Stabler access to your test repository so that Azure can properly clone the test files.
strategy:
  ...
  matrix:
    **your_region**:
      testDir: $(Agent.HomeDirectory)\**your_region**_daysim_test
      gitRepo: **your_git_repo**.git
      config: $(testDir)\path\to\**your_regress_properties_file**
      targets: $(testDir)\path\to\**your_target_outputs_folder**
  • Push your branch to Github.
  • The test server will clone your repository and run the tests. Results can be reviewed on the Azure devops dashboard.
  • If your tests pass, submit a Pull Request! Your additions will be reviewed for inclusion in the main DaySim test system.