Can I invoke QTP test suits automatically from Maven/Hudson?

后端 未结 5 2067
伪装坚强ぢ
伪装坚强ぢ 2021-01-14 04:03

We need to integrate QTP with Hudson to automatically invoke test suites against the code deployed in Hudson. The build process is based on Maven.

Is there any plugi

5条回答
  •  一生所求
    2021-01-14 04:39

    As Michael says, this is a Maven integration issue not a Hudson one. I don't know of a Maven plugin for QTP, but you can use the exec-maven-plugin to invoke an arbitrary executable, and provide arguments to that executable. QTP provides an "Automation" API that you should be able to wrap in a script fairly easily. It won't be a slick integration but may serve your purposes.

    Here's an example of the configuration you could use:

    
      org.codehaus.mojo
      exec-maven-plugin
      1.1.1
      
        
          
            exec
          
        
      
      
        [qtp executable]
        /target            
        
          [an argument to configure QTP]
          [another argument to configure QTP]
                  
      
    
    

    An answer to a previous question on invoking QTP from Ant is a good starting point for writing the Automation integration.


    Update:

    Here's an approach that may work for you. It appears that you can directly invoke the QTP server, passing the name of the test you want executing. So you can use the antrun plugin to invoke the url and direct the output to a target directory. Modify the url and test name to match your environment and QTP should be invoked and the results placed in target/qtp/results.html. This assumes that you have a single test you can invoke to do everything you need to in QTP.

    
      
        maven-antrun-plugin
        1.3
        
          
            test
            
              
                
              
            
            
              run
            
          
        
      
    
    

提交回复
热议问题