Autotest documentation

Hi,
I am new to autotest framework. I am able to run the tests for Copter. I can see a huge log on the console and also log files in the buildlogs directory. Is there any tool to visualize the tests status ? How do the get the summary of all failed test cases?

You should get a summary at the end of the run on failing and skipped tests.

pbarker@bluebottle:~/rc/ardupilot(master)$ ./Tools/autotest/autotest.py --gdb --debug build.Tracker test.Tracker --show-test-timings
lckfile='/home/pbarker/rc/buildlogs/autotest.lck'
step=build.Tracker
step=test.Tracker
Running: ("git rev-parse HEAD") in (/home/pbarker/rc/ardupilot)
.
.
AT-0086.0: Stopping SITL
AT-0086.2: Skipped tests:
  ArmFeatures (see See https://github.com/ArduPilot/ardupilot/issues/10652)
  CPUFailsafe (see  tracker doesn't have a CPU failsafe)
AT-0086.2: Spent 4.000000 seconds waiting to arm. count=1 avg=4.0
AT-0086.2:                              Test Onboard Logging: 0.23s
AT-0086.2:                                  Get Capabilities: 0.31s
AT-0086.2:                               Test SERVOTEST mode: 0.73s
AT-0086.2:                                  Test MANUAL mode: 0.92s
AT-0086.2:                                    Test SCAN mode: 1.19s
AT-0086.2:                   Test Onboard Logging Generation: 4.63s
AT-0086.2: Test AHRS NMEA Output can be read by out NMEA GPS: 4.87s
AT-0086.2:                            Test Config Error Loop: 5.18s
AT-0086.2:                                   Test PID Tuning: 5.53s
AT-0086.2:                                  Test GUIDED mode: 5.57s
AT-0086.2:                       Test initial mode switching: 5.82s
AT-0086.2:                                     Test Set Home: 11.68s
AT-0086.2:                            Test Parameter Set/Get: 16.44s
AT-0086.2:                          **--tests_total_time--**: 63.10s
AT-0086.2: mavproxy_start was called 0 times
>>>> PASSED STEP: test.Tracker at Fri Feb 11 11:54:47 2022
pbarker@bluebottle:~/rc/ardupilot(master)$  

The full autotest suite also writes out a summary html file - but running it in that mode isn’t for the faint of heart…

1 Like

Thanks, I could see the test summary with --show-test-timings option.

I could a jenkins file that was deleted in 2015 from the repo, assuming all the test functionality has been moved to github actions.

Is there any way, i can get xunit style result.xml file from the test run, so that i can visualize the tests and traverse through them on the GUI to make my life easier? :stuck_out_tongue:

Welll… do you know Python? :slight_smile: