Skip to content

Pause and step execution from Studio #91

Open

Description

@KristianKarl-zz

When running a test, it should be possible to connect to the test using websocket and get the models associated wit the test visualized in studio. This is already possible today as from PR 85 (#85)

Nest task would be to enable a user to pause an execution from Studio. Also to step, and make it run normally, and slow it down using the "Execution Delay" slider.

Activity

  1. added this to the 4.0.0 milestone on Aug 1, 2016
  2. KristianKarl-zz commented on Aug 2, 2016

    @KristianKarl-zz
    ContributorAuthor

    @nilols I was pondering on how to implement this. There is no obvious way for the WebSocket server to interrupt the execution in org.graphwalker.java.test.TestExecutor#execute(boolean).

    Do you have any ideas on how we could do this?

    Case 1

    This is an example of how the WebSocket hooks up now. But it only displays execution. There is no interaction from Studio (via the websocket)

    public static void main(String[] args) throws IOException, InterruptedException {
        Executor executor = new TestExecutor(PetClinic.class,
                FindOwners.class,
                NewOwner.class,
                OwnerInformation.class,
                Veterinariens.class);
    
        WebSocketServer server = new WebSocketServer(8888, executor.getMachine());
        server.start();
    
        Result result = executor.execute(true);
        if (result.hasErrors()) {
            for (String error : result.getErrors()) {
                System.out.println(error);
            }
        }
        System.out.println("Done: [" + result.getResults().toString(2) + "]");
    }

    Case 2

    When using annotation, it would be cool, if a websocket could be run somehow. Either by default, or using some new annotation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions