Skip to content

Use CaptureHistory() instead of HistoryCarbonCopy #460

@Garados007

Description

@Garados007

We can use CaptureHistoryStart() and CaptureHistory() to capture all history output between the start of the capture and the current invocation. Igor can maintain multiple history captures at the same time and all we have to do is to remember the reference number returned by CatuptureHistoryStart() and provide it to CaptureHistory(). We can call CaptureHistory() multiple times and can stop a specific capture when there is no longer a need for it.

Function test()
	variable refNum = CaptureHistoryStart()
	print "Hello world!"
	
	string capture = CaptureHistory(refNum, 0) // 0 is to keep capture active
	print "🌲"
	print capture // should be "Hello world!"
	
	capture = CaptureHistory(refNum, 1) // 1 stops capture
	print capture // should be "Hello world!\n🌲\nHello world!"
End

We currently use a single notebook with the specific name HistoryCarbonCopy which contains magically all history output including the one there is no use for us (because its the output before the current test suite, test case, ...). We capture at the start and end of all test runs/suites/cases all historic output and create the desired string slices at the end of them.

I think we can improve our data collection when we use CaptureHistoryStart() and CaptureHistory() instead and do not rely on hidden magical notebooks.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions