Sending Test Data to Your StreamBase Application

Purpose

This topic is the last step of the Getting Started tutorial. So far, we have:

  1. Launched StreamBase Studio

  2. Created a StreamBase project

  3. Created our first StreamBase application, MyFirstApp.sbapp or MyFirstApp.ssql

  4. Started our application and switched to the SB Test/Debug perspective

  5. Created a feed simulation, firstapp-enum.sbfs

Now we are ready to enqueue some test data to the running application using our feed simulation, and view its output in Studio.

Test Your Application with Simulated Data

  1. In the Application Output view, make sure that the Output stream option is set to All streams.

  2. In the Feed Simulations view, select firstapp-enum.sbfs and click Run.

    Notice that the Application Input view displays generated tuples enqueued from your Feed Simulation. At the same time, the Application Output view begins displaying tuples on the two output streams.

  3. Let the feed simulation run for five or ten seconds, then click Stop.

    Note that stopping the Feed Simulation does not stop the application.

  4. Observe the results in the Application Input and Application Output views. (If necessary, resize the views so that you can see their contents clearly.)

    • You should see trades values that are both above and below the threshold of 10000 that was set in your Filter operator. For example:

    • In the Application Output View, find some tuples in the list that were dequeued to the Big Trades stream, and check its quantity. Verify that the value is 10000 or larger.

      Tip

      Click a row to display its field summary below the list, as shown in the next figure.

    • Check somes tuples in the list that were dequeued to the AllTheRest stream: verify that these trades are below 10000. For example:

  5. Click the Stop Running Application button in the StreamBase toolbar.

    When the application stops, Studio switches back to the SB Authoring perspective.

Tip

You could have combined the last two steps: If you stop the application, the feed simulation is stopped too. Separating the steps give you more flexibility: for example, you can run a different feed simulation or enqueue data manually, without restarting the application.

Finally, it is worth noting that if you developed both MyFirstApp.sbapp and MyFirstApp.ssql, and run both using the same data, you should notice exactly the same output for both forms of the application.

Summary and Next Steps

In this topic, you learned how to enqueue data to the application using a feed simulation, and to observe the output.

Click Next to go to review and finish the tutorial.

Back to Top ^