2 Replies Latest reply on Oct 20, 2012 11:39 AM by igarashitm

    0.6 SwitchYard Eclipse Editor feedback

    igarashitm

      Hi all,

       

      I have been playing around with SwitchYard Editor and got a few ideas of nice to have.

       

      • Generate an integration test (invoking service via binding)
        • add corresponding mixin into test class
        • mock up the reference binding if needed
          • for SOAP reference binding, generate mock web service from WSDL with one-action (maybe adding HttpMixIn.publishMockWebService() or something and Editor just invoke it)

       

      • Visualize test class in the Editor
        • show the test class for click&run (just trigger mvn test -Dtest=xxx)

       

      • Add component dependency to POM when dropping the bindings or implementations to the diagram
        • SWITCHYARD-785 -

       

      • Visualize transaction boundary in diagram
        • e.g. have a dotted line on transaction boundary
          • on the service/reference which is marked as suspendTransaction
          • around the component if its implementation is marked as managedTransaction.Local
          • on the consumer's reference when consumer provides transaction but the producer's implementation is marked as noManagedTransaction
          • on the producer's service when consumer doesn't provides transaction but producer's implementation is marked as managedTransaction.Global

       

      • Visualize transformation/message validation in the diagram
        • e.g. change the wire color

       

      Could you guys let me know what do you think about these?

       

      Thanks,

      Tomo

        • 1. Re: 0.6 SwitchYard Eclipse Editor feedback
          rcernich

          Hey Tomo,

           

          Thanks for the feedback.

          • Generate an integration test (invoking service via binding)
            • add corresponding mixin into test class
            • mock up the reference binding if needed
              • for SOAP reference binding, generate mock web service from WSDL with one-action (maybe adding HttpMixIn.publishMockWebService() or something and Editor just invoke it)

          I think it's a great idea to have the tooling generated tests for invocations through the binding and this should be something we could do rather easily.  Setting up mocks for references is a great idea too, but is a bit more complicated.  A nice place to bring these together might be through a "new integration test" that would stub out tests for all the external interfaces to the application (i.e. composite services and references).  I'd have to give it a lot more thought though to see what's feasible.

           

          • Visualize test class in the Editor
            • show the test class for click&run (just trigger mvn test -Dtest=xxx)

          This would be cool, but will definitely require some work in the tooling.  I think the problem we would have is resolving the tests back to services.  We'd need to scan the test classes for @RunWith(SwitchYardRunner.class) and @ServiceOperation.  Currently, the tests created by the tooling specify the service for ServiceOperation, but a lot of tests in the quickstarts use service.operation.  The latter could mean you have multiple test classes for a specific service (which I guess could always be possible anyway).

           

          Also, for execution, using Maven is a good approach, but from a tooling perspective, I think I'd prefer something like, "Run As->JUnit Test."  This executes the test using Eclipse's JUnit tools, which gives you the ability to debug and rerun failed tests.

           

           

          • Visualize transaction boundary in diagram
            • e.g. have a dotted line on transaction boundary
              • on the service/reference which is marked as suspendTransaction
              • around the component if its implementation is marked as managedTransaction.Local
              • on the consumer's reference when consumer provides transaction but the producer's implementation is marked as noManagedTransaction
              • on the producer's service when consumer doesn't provides transaction but producer's implementation is marked as managedTransaction.Global

          Another great idea.  This may be difficult to accomplish with the underlying framework we are using for the graphical editor.  I'd have to look to see if it's feasible in the tooling and we can move forward from there.

           

           

          • Visualize transformation/message validation in the diagram
            • e.g. change the wire color

          Could you provide more details?  We already place error decorators on connections missing transformers.  Is that OK for transformation?

           

          As far as validation, identifying whether a validator is configured, what did you have in mind?  Would the decorator go on the connection or on the service?  (I'm assuming validation applies to the type, which is declared on the interface.)

           

          Thanks a lot for the great ideas.  Feel free to create JIRA for any/all.

           

          Best,

          Rob

          • 2. Re: 0.6 SwitchYard Eclipse Editor feedback
            igarashitm

            Thank you for the comments, Rob!

             

            • Generate an integration test (invoking service via binding)
              • add corresponding mixin into test class
              • mock up the reference binding if needed
                • for SOAP reference binding, generate mock web service from WSDL with one-action (maybe adding HttpMixIn.publishMockWebService() or something and Editor just invoke it)

            I think it's a great idea to have the tooling generated tests for invocations through the binding and this should be something we could do rather easily.  Setting up mocks for references is a great idea too, but is a bit more complicated.  A nice place to bring these together might be through a "new integration test" that would stub out tests for all the external interfaces to the application (i.e. composite services and references).  I'd have to give it a lot more thought though to see what's feasible.

            Yeah, we will definitely have more fun with "new integration test". I think we can just start with the JCA binding because it already supports starting embedded JMS and JCA inside for testing, and next step will be adding HttpMixIn.publishMockWebService().

            https://issues.jboss.org/browse/SWITCHYARD-1125

             

            • Visualize test class in the Editor
              • show the test class for click&run (just trigger mvn test -Dtest=xxx)

            This would be cool, but will definitely require some work in the tooling.  I think the problem we would have is resolving the tests back to services.  We'd need to scan the test classes for @RunWith(SwitchYardRunner.class) and @ServiceOperation.  Currently, the tests created by the tooling specify the service for ServiceOperation, but a lot of tests in the quickstarts use service.operation.  The latter could mean you have multiple test classes for a specific service (which I guess could always be possible anyway).

             

            Also, for execution, using Maven is a good approach, but from a tooling perspective, I think I'd prefer something like, "Run As->JUnit Test."  This executes the test using Eclipse's JUnit tools, which gives you the ability to debug and rerun failed tests.

            I do agree it would be great if the SwitchYard test cases could be run with Eclipse JUnit feature.

            https://issues.jboss.org/browse/SWITCHYARD-1126

             

            • Visualize transaction boundary in diagram
              • e.g. have a dotted line on transaction boundary
                • on the service/reference which is marked as suspendTransaction
                • around the component if its implementation is marked as managedTransaction.Local
                • on the consumer's reference when consumer provides transaction but the producer's implementation is marked as noManagedTransaction
                • on the producer's service when consumer doesn't provides transaction but producer's implementation is marked as managedTransaction.Global

            Another great idea.  This may be difficult to accomplish with the underlying framework we are using for the graphical editor.  I'd have to look to see if it's feasible in the tooling and we can move forward from there.

            I believe you'll find a great way for that

            https://issues.jboss.org/browse/SWITCHYARD-1127

            • Visualize transformation/message validation in the diagram
              • e.g. change the wire color

            Could you provide more details?  We already place error decorators on connections missing transformers.  Is that OK for transformation?

             

            As far as validation, identifying whether a validator is configured, what did you have in mind?  Would the decorator go on the connection or on the service?  (I'm assuming validation applies to the type, which is declared on the interface.)

            Hmm, I thought where the transformation would actually occur is great to see, but that error decorators would be good enough on transformers.

            And yep you are right, validation should be on service or reference because the type would be different if transform occurs. So maybe putting an additional icon on the service/reference?

            https://issues.jboss.org/browse/SWITCHYARD-1128

             

            Thanks again!

            Tomo