Create and Run a RoadRunner Test Case - MATLAB & Simulink - MathWorks 日本 (2024)

Create and Run a RoadRunner Test Case

You can use the Test Manager or Simulink® Test™ API commands to create and run RoadRunner test cases. RoadRunner is automates different types of agents on ego vehicles in road scenario simulations.

Note

To run a RoadRunner test case, you must have a RoadRunner and a RoadRunner Scenario license.

Set Up RoadRunner and Simulink Model

Before you can run a RoadRunner test case, set up your RoadRunner project and scenario using the RoadRunner application and verify that the scenario runs as expected. See Simulate RoadRunner Scenarios with Actors Modeled in Simulink (Automated Driving Toolbox), RoadRunner Project and Scene System (RoadRunner), and Create Simple RoadRunner Scene (RoadRunner).

You must also develop the Simulink model that you use as a behavior in RoadRunner. You also use this model as the system under test in Simulink Test.

Use the Test Manager to Run a RoadRunner Test

  1. Open the Test Manager by using sltest.testmanager.view.

  2. Create a test file by clicking New > Test File.

  3. Create a RoadRunner test case template by clicking New > Test Case > RoadRunner Test. The RoadRunner section of the test case opens.

    Create and Run a RoadRunner Test Case- MATLAB & Simulink- MathWorks 日本 (1)

  4. Set the simulation options and specify the folder and file locations.

    • Console Mode — When you select this option, the RoadRunner user interface is not displayed when the test runs.

    • Force Pacing Off — When you select this option, the RoadRunner simulation runs at its normal speed. When this option is cleared, you can tune the pace in the RoadRunner application to control the speed of the simulation.

    • RoadRunner Scenario — Full path to RoadRunner scenario, which is usually in the project folder.

    • Override RoadRunner Setup Settings — When you select this option, you override the preferred path settings and the section displays the RoadRunner Project Folder and RoadRunner Installation Folder fields. When you clear this option, the test case uses the preferred path settings.

    • RoadRunner Project Folder — Full path to the RoadRunner project folder.

    • RoadRunner Installation Folder — Full path to the RoadRunner executable folder.

  5. In the System Under Test section, enter the name of the Simulink model that you attached to the ego vehicle in the RoadRunner scenario. The folder for the model must be on the MATLAB® path.

  6. In the Iterations section, you can choose whether to stop the test case execution when a test iteration failure occurs by selecting Enable stop on failure for test iterations. Use the Scripted Iterations section to set model parameters or RoadRunner scenario variables.

    This example shows two scenario variables defined in RoadRunner.

    Create and Run a RoadRunner Test Case- MATLAB & Simulink- MathWorks 日本 (2)

    This image shows how to set the values of the variables in two iterations and add the iterations to the test case.

    Create and Run a RoadRunner Test Case- MATLAB & Simulink- MathWorks 日本 (3)

    You can also define custom variables in the Scripted Iterations section and then use them in a callback. For example, this image shows how to define a custom variable to use in two iterations, then use a callback to print the variable.

    Create and Run a RoadRunner Test Case- MATLAB & Simulink- MathWorks 日本 (4)

  7. In the Callbacks section, in addition to other variables, you can use these two RoadRunner-specific variables in RoadRunner test cases:

    • sltest_roadRunnerApp — RoadRunner application object

    • sltest_roadRunnerSim — RoadRunner simulation object

  8. Use other test case sections as needed. Other test case sections work the same for RoadRunner tests as they do for other types of tests. See Specify Test Properties in the Test Manager.

  9. Click Run to run the RoadRunner test. A RoadRunner session starts and runs the scenario simulation and model. A RoadRunner application session opens and then closes when each iteration is complete. If you selected Console Mode, the RoadRunner interface does not display.

    The test uses the simulation mode set in the Simulink model. You cannot override the simulation mode for a RoadRunner test case in the Test Manager. To change the simulation mode, change the mode in the Simulink model.

  10. When the test finishes running, the Simulation Metadata table in the Results Summary section includes RoadRunner information.Create and Run a RoadRunner Test Case- MATLAB & Simulink- MathWorks 日本 (6)

  11. Optionally, generate reports of the RoadRunner test specifications and test results.

Use Simulink Test API Commands to Create and Run a RoadRunner Test

For general information on using Simulink Test API commands to create a test script, see Create and Run Test Cases with Scripts. To create a RoadRunner test using the API:

  1. Create a test file by using sltest.testmanager.TestFile.

  2. Create a new test suite by using sltest.testmanager.TestSuite.

  3. Create a RoadRunner test case by using createTestCase with the runOnPlatform="RoadRunner" input argument.

  4. Specify the RoadRunner options by using these setProperty method name-value arguments:

    • RoadRunnerRunInConsoleMode

    • RoadRunnerTurnOffPacing

    • RoadRunnerProjectFolder

    • OverrideRoadRunnerDefaultSettings

    • RoadRunnerInstallationFolder

    • RoadRunnerScenarioPath

    • StopOnFailure

  5. Assign the Simulink model as the system under test by using the Model name-value argument of setProperty.

  6. If needed, set up test iterations by using sltest.testmanager.TestIteration. You can switch the RoadRunner scenario by using setRoadRunnerScenario. You can also define custom variables and set RoadRunner scenario variables in iterations and then use the variables in callbacks. Set the values for RoadRunner scenario variables or custom variables by using setRoadRunnerScenarioVariable and setRoadRunnerCustomVariable.

  7. Define callbacks for the test case, if needed, by using PreLoadCallback, PostLoadCallback, or CleanupCallback name-value arguments of the setProperty method.

  8. Run the test case.

  9. Generate a results report, if needed, by using sltest.testmanager.TestResultReport.

RoadRunner Test Case Limitations

  • Testing multiple Simulink agents is not supported.

  • Testing MATLAB agents is not supported.

  • You cannot convert between a regular test case and a RoadRunner test case.

  • Multiple release testing, parallel testing, and using the Model Slicer are not supported.

  • Fast restart is not supported in the Iterations section of the Test Manager.

See Also

setRoadRunnerScenario | setRoadRunnerCustomVariable | setRoadRunnerScenarioVariable | getRoadRunnerCustomVariableValueByName | setProperty

Related Topics

  • RoadRunner Project and Scene System (RoadRunner)
Create and Run a RoadRunner Test Case
- MATLAB & Simulink
- MathWorks 日本 (2024)

References

Top Articles
Noga Funeral Home Obituaries
Olde Kegg Bar & Grill Portage Menu
Express Pay Cspire
Design215 Word Pattern Finder
Metallica - Blackened Lyrics Meaning
Botw Royal Guard
Lamb Funeral Home Obituaries Columbus Ga
Coverage of the introduction of the Water (Special Measures) Bill
Missing 2023 Showtimes Near Cinemark West Springfield 15 And Xd
How To Get Free Credits On Smartjailmail
Craigslist Nj North Cars By Owner
Mivf Mdcalc
Fool’s Paradise movie review (2023) | Roger Ebert
Youravon Comcom
Houses and Apartments For Rent in Maastricht
Hocus Pocus Showtimes Near Amstar Cinema 16 - Macon
Roof Top Snipers Unblocked
Watch The Lovely Bones Online Free 123Movies
Ein Blutbad wie kein anderes: Evil Dead Rise ist der Horrorfilm des Jahres
O'Reilly Auto Parts - Mathis, TX - Nextdoor
Scheuren maar: Ford Sierra Cosworth naar de veiling
Ihub Fnma Message Board
Low Tide In Twilight Ch 52
kvoa.com | News 4 Tucson
Wsbtv Fish And Game Report
The 15 Best Sites to Watch Movies for Free (Legally!)
Harbor Freight Tax Exempt Portal
Bayard Martensen
Pronóstico del tiempo de 10 días para San Josecito, Provincia de San José, Costa Rica - The Weather Channel | weather.com
Sacramento Craigslist Cars And Trucks - By Owner
Ehome America Coupon Code
Vlacs Maestro Login
Publix Daily Soup Menu
6143 N Fresno St
Studentvue Columbia Heights
5 Tips To Throw A Fun Halloween Party For Adults
Weather Underground Bonita Springs
MSD Animal Health Hub: Nobivac® Rabies Q & A
Conan Exiles Armor Flexibility Kit
888-822-3743
Vérificateur De Billet Loto-Québec
Quaally.shop
Marcal Paper Products - Nassau Paper Company Ltd. -
Caesars Rewards Loyalty Program Review [Previously Total Rewards]
Hughie Francis Foley – Marinermath
Craigslist Pet Phoenix
Model Center Jasmin
Is My Sister Toxic Quiz
Julies Freebies Instant Win
Ssss Steakhouse Menu
Hcs Smartfind
Dinargurus
Latest Posts
Article information

Author: Dan Stracke

Last Updated:

Views: 6228

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Dan Stracke

Birthday: 1992-08-25

Address: 2253 Brown Springs, East Alla, OH 38634-0309

Phone: +398735162064

Job: Investor Government Associate

Hobby: Shopping, LARPing, Scrapbooking, Surfing, Slacklining, Dance, Glassblowing

Introduction: My name is Dan Stracke, I am a homely, gleaming, glamorous, inquisitive, homely, gorgeous, light person who loves writing and wants to share my knowledge and understanding with you.