| Author | 
		  Message
		 | 
		
		  | sleepyjamie | 
		  
		    
			  
				 Posted: Wed Aug 19, 2015 12:15 pm    Post subject: Unit testing a node? | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 29 Apr 2015 Posts: 135
  
  | 
		  
		    
			  
				| I want to unit test a function within an ESQL node that performs a transformation. Does WMB Toolkit allow you to do this? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Wed Aug 19, 2015 12:22 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				There's no method to execute ESQL code outside of the runtime.
 
 
Unless v10 has added this - I've not done much with v10.
 
 
For this kind of thing, I always make a very simple flow that uses MQInput/MQOutput and has a compute node that creates a fixed (or set of fixed) input messages.  Or, of course, you could send a fixed/known message or set of messages to the input node. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sleepyjamie | 
		  
		    
			  
				 Posted: Wed Aug 19, 2015 12:41 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 29 Apr 2015 Posts: 135
  
  | 
		  
		    
			  
				
   
	| mqjeff wrote: | 
   
  
	There's no method to execute ESQL code outside of the runtime.
 
 
Unless v10 has added this - I've not done much with v10.
 
 
For this kind of thing, I always make a very simple flow that uses MQInput/MQOutput and has a compute node that creates a fixed (or set of fixed) input messages.  Or, of course, you could send a fixed/known message or set of messages to the input node. | 
   
 
 
 
Yeah that's what I guessed was to use an mq input/output node. Thanks! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | sleepyjamie | 
		  
		    
			  
				 Posted: Thu Aug 20, 2015 6:01 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Centurion
 
 Joined: 29 Apr 2015 Posts: 135
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mqjeff | 
		  
		    
			  
				 Posted: Thu Aug 20, 2015 6:05 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Master
 
 Joined: 25 Jun 2008 Posts: 17447
  
  | 
		  
		    
			  
				
 
 
Cool!
 
 
As I said, I haven't worked with v10 very much. _________________ chmod  -R ugo-wx / | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Thu Aug 20, 2015 6:28 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| mqjeff wrote: | 
   
  
	
 
 
Cool!
 
 
As I said, I haven't worked with v10 very much. | 
   
 
 
 
The flow exerciser is cool (and my experience is likewise somewhat limited).
 
 
It doesn't do exactly what the OP originally wanted; you can't take a function outside of the module and just test that. But it does revolutionize testing a single flow, and that includes a single flow that's the kind of harness described here to test a function. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |