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. If your app is not now running, click the Run button to start it. If StreamBase Studio asks you if you want to switch from the Authoring perspective to the SB Test/Debug perspective, click Yes.

  2. In the Application Output view, make sure that the Stream option is set to (All Output Streams).

  3. 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.

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

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

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

    • In the Application Input view, notice that the list of trades value has entries that are both above and below the threshold of 10000 that was set in your Filter operator. For example:

    • In the Application Output View, select BigTrades from the Stream drop-down. Verify that the quantity value is always above 10000 for entries in the list.

      Tip

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

    • In the Application Output View, select AllTheRest from the Stream drop-down. Verify that the quantity value is always below 10000 for entries in the list.

  6. Click the Stop Running Application button in the StreamBase toolbar, or press F9.

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

Finally, it is worth noting that if you developed both MyFirstApp.sbapp and MyFirstApp.ssql, and run both using the same feed simulation, 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 ^