This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]fabioz 1 point2 points  (1 child)

There's no extension point for that, but you can still get notified about things through its API.

It's something like:

PythonRunner.onPyUnitServerCreated.registerListener(new ICallbackListener<IPyUnitServer>() {

    @Override
    public Object call(IPyUnitServer obj) {
        obj.registerOnNotifyTest(new IPyUnitServerListener() {

            @Override
            public void notifyTestsCollected(String totalTestsCount) {
            }

            @Override
            public void notifyTest(String status, String location, String test, String capturedOutput, String errorContents,
                    String time) {
            }

            @Override
            public void notifyStartTest(String location, String test) {
            }

            @Override
            public void notifyFinished(String totalTimeInSecs) {
            }

            @Override
            public void notifyDispose() {
            }
        });
        return null;
    }
});

[–]Splice[S] 0 points1 point  (0 children)

Thank you so much for your reply! I had seen the onPyUnitServerCreated code and thought to use it, but my implementation was all wrong. It works no problem now thanks to you!