wrapping an endpoint with visualizer calls

Poster Content
nk4um User
Posts: 2
July 23, 2012 17:04

Yes, Tony, I expect to see you this week. I won't next. I will be out of office attending Groovy conference I organize - GR8 Conf US 2012 - http://gr8conf.us.

I do expect the issue to be something minor. I hit the roadblock late in the day and no longer had the energy to debug further. I am working on other issues in the meantime. However, if there was something obvious someone pointed out, I'd jump back into this.

Thanks! See you Wednesday!

Posted by tab (View)
Hi Bill,

using the visualizer as part of a unit test is something that we do for some of our tests. It looks like you're on the right path but something minor must be wrong. I believe I'm going to see you next week so lets sort this out face to face.

Cheers, Tony

Like · Post Reply
nk4um Administrator
Posts: 607
July 23, 2012 16:36

Hi Bill,

using the visualizer as part of a unit test is something that we do for some of our tests. It looks like you're on the right path but something minor must be wrong. I believe I'm going to see you next week so lets sort this out face to face.

Cheers, Tony

Like · Post Reply
nk4um User
Posts: 2
July 23, 2012 15:55wrapping an endpoint with visualizer calls

One team in our very big project has created a framework for testing NK using Spock. The advantage to this is that the tests can be run as part of the build process via Jenkins. What is lost is the ability to run Visualizer traces during test execution. One solution we've discussed, and for which I have produced something of a prototype is to wrap the test with visualizer calls. There are several steps to this process:

1) clear cache (this was not truly verified as working)

 - call context.getKernelContext().getKernel().getRepresentationCache().clear() (maybe there is an endpoint that can be hit?)

2) deleting all traces

 - context.source("active:visualizerClear")

3) start trace

 - context.source("active:visualizerStart")

4) call sample endpoint 5) stop trace

 - context.source("active:visualizerStop")

6) save trace

 - context.createRequest("active:visualizerData") - several other steps will be involved here

The first two steps seem to work fine. The last step will show all traces that exist in the system up to the time I run my spike. However, there does not seem to be any trace for the sample endpoint. My guess is that the sample endpoint somehow needs to be detached from the process from which the visualizer is being run. I have yet to identify the missing piece. Has anyone done something similar or able to shed any light?

Thanks!

Like · Post Reply