IBMStreams / administration

Umbrella project for the IBMStreams organization. This project will be used for the management of the individual projects within the IBMStreams organization.
Other
19 stars 10 forks source link

Discussion: new project streamsx.testing #91

Closed ddebrunner closed 6 years ago

ddebrunner commented 8 years ago

There are two testing mechanisms today for Streams:

This project would build upon these mechanisms to provide testing for IBM Streams applications including:

This is more for discussion at this point rather than a proposal, I think a new separate project makes more sense than adding to streamsx.topology.

Initial code might be JUnit integration for the two mechanisms, some based upon the way that streamsx.topology does its own testing, having the ability to run the same test against standalone or distributed.

Such a project would need community buy-in involvement, for example encouraging existing github toolkits to use the testing mechanism to test their operators. The project should probably grow organically, adding stuff as people try to use the testing and find something useful that could be added.

Thoughts?

mikespicer commented 8 years ago

I like the idea, we often get questions asking what the best practices are for testing operators and applications. Another area that may be better handled in a separate project is data feed simulators and the ability to record and replay feeds for testing of applications and analytics.

ddebrunner commented 8 years ago

bump

ddebrunner commented 8 years ago

Going to close this due to lack of general interest.

Will probably come back with an actual proposal with some actual code and examples.

chanskw commented 7 years ago

I'd like to reopen this discussion. Sorry, did not have time to look at this previously.

I like the idea of the project and what it is trying to provide. I think there is a need for it as more and more people are trying to develop toolkits and operators. I got asked 3 times in the last week on how to do this.

We also have a JUnit framework that we are using internally for testing the toolkit. The framework provides the following, which may not be available with the pure topology APIs:

I am wondering if it makes sense to make this available as part of this testing project, and we slowly work together to have a more unified framework for testing. A lot of the toolkit testing on Github is built on top of this framework.

chanskw commented 7 years ago

@ddebrunner do you also have examples / documentation on how to do SPL testing using the topology APIs?

ddebrunner commented 7 years ago

I have been improving the testing api in topology, but comparing to above:

ddebrunner commented 7 years ago

As an update there is some work in topology for supporting the same condition concept for topologies defined in Python (which also supports invocation of SPL operators), including support planned for running tests on the Streaming Analytic service.

Python & Python unittest might make an easier approach for testing SPL applications than Java & JUnit.

ddebrunner commented 6 years ago

As an update Python tester is supported now and includes support for running tests against Streaming Analytics service. Any test is just a standard unittest.TestCase so can reuse any functionality there. E.g. a test case can submit an application and test any external effects while the app is running or after (e.g. checking a database or a file to see if the app updated the contents). Since this is just unittest any existing mechanisms for testing external contents can be used.

For Streams artifacts the focus is on checking the contents of streams, thus not requiring the test app to write out to files to verify the behaviour.

The Java topology Junit tester with 1.7 also now supports testing against the streaming analytics service.

chanskw commented 6 years ago

Do we want to create the streamsx.testing repository at this time? I think having a repository will help us discuss and work on creating test guidelines and best practiese. We can start working on showing how testing should be done, create documentation and also identify potential gaps in our test stories.

chanskw commented 6 years ago

Alright. I created streamsx.testing. We can start contributing samples and move our test discussions over there.