Printer FriendlyEmail Article Link

Spirent TestCenter-Automation: How to export Spirent TestCenter StreamBlock results to csv or xls format using TCL API?

Environment/Versions
  • Spirent TestCenter
  • All Versions
Answer
  • Subscribe the Results at the beginning or before you start the traffic:

set hResultDataSet [stc::subscribe -Parent $hProject \
   -configType StreamBlock \
   -resultType RxStreamSummaryResults \
   -filenameprefix RxStreamSummaryResults \
   -viewAttributeList [list MinLatency MaxLatency AvgLatency BitRate DroppedFrameCount FrameCount FrameRate]]

  • Once the Test stopped Export the results to CSV using ExportResult command

stc::perform ExportResults -FileNamePrefix "TestFile"  -OutputFormat "csv" -WriteMode "APPEND" -ResultView $hResultDataSet

Note: When you Subscribe the results with filenameprefix with name will create “name.csv” file as well

set hResultDataSet [stc::subscribe -Parent $hProject \
      -configType StreamBlock \
      -resultType RxStreamSummaryResults \
      -interval 1 \
      -filenameprefix “RxStreamSummaryResults” \
      -viewAttributeList [list MinLatency MaxLatency AvgLatency BitRate DroppedFrameCount FrameCount FrameRate]]

 


Product : Spirent TestCenter,L2-3,Automation,API