Forum Discussion

yahiatene's avatar
yahiatene
Occasional Contributor
6 years ago

Health-check for SOAP UI Pro in continuous integration with Jenkins

Hello,
Most of tools dispose of “health check” routine that verify that everything is OK before starting the CI pipeline.

So before executing the SoapUI tests in Jenkins I want to verify that :

  1. - TestRunner of ReadyAPI is available
  2. - Licences are available in sufficient quantity
  3. - Each component  of the testing tool is ready to use

Maybe it is very simple and I just have to run a blanc test, maybe the control is stricter and I can run some of health-check procedure.

 

So the point is :

  • - What are the best-practices you have observed in IC integration ? What is your advice ?
  • - Does the health-check procedure exists and how to run it ?

 

Thanks a lot :) 

Mohamed.

  • nmrao's avatar
    nmrao
    Champion Level 3

    yahiatene 

     

    While I agree with groovyguy , following are my remarks.

    In the pre-build step, try the following

    1.  testrunner is a file after all. You can can check it exists

    2. Depends on the type of the licence. If it is fix type assigned to (which is the preferred type at least for CI builds) jenkins machine, no need to bother about it. It will be problem only if you are using floating licence and some other guy in the team is using it.

    3. I think you may use some  plugin  so that call http request (for the application under test) as part of pre-build step for the endpoint and see if that is giving 200 OK.

    • yahiatene's avatar
      yahiatene
      Occasional Contributor

      Hi nmrao,

      Thank you very much for your answer and your remarks, I have already done the existence test for the testRunner. We use floating licenses so it's a little hard to check their availability. Regarding the last remark, could you give me a little more details on how to do that? And is it possible to block access to a license if it is already being used ?

      Thank you again
      Best regards
      Mohamed

      • nmrao's avatar
        nmrao
        Champion Level 3
        #3, Use the below plugin for Jenkins and call your host:post to see 200 OK as part of per-requisite step before invoking actual build.
        https://wiki.jenkins.io/display/JENKINS/HTTP+Request+Plugin

        "is it possible to block access to a license if it is already being used " - As there is no way to check automatically, so need not worry. If build is scheduled your evening hours (most of the employees would be left by then and license would be free), you should be good.
    • groovyguy's avatar
      groovyguy
      Community Hero

      Based on my experience with Jenkins and pipelines with ReadyAPI so far, there's no easy way to do what you are asking. You basically want to do a health check on ReadyAPI, but as far as I am aware there's no out-of-the-box solution to do that. You mentioned the idea of running a blanc test, which is likely an easy solution to start with that you can refine as you go.

  • sonya_m's avatar
    sonya_m
    SmartBear Alumni (Retired)

    msiadaknmrao, thank you for the suggestions! 

    yahiatene , do these suggestions work for your case?

     

     

     

  • SiKing's avatar
    SiKing
    Community Expert

    I am unclear what exactly you are trying to accomplish.

     


    yahiatene wrote:

    Most of tools dispose of “health check” routine that verify that everything is OK before starting the CI pipeline.

    Could you give an example of such a tool?

     


    yahiatene wrote:

    So before executing the SoapUI tests in Jenkins I want to verify that :

    1. - TestRunner of ReadyAPI is available
    2. - Licences are available in sufficient quantity
    3. - Each component  of the testing tool is ready to use

    What would you expect to happen in your pipeline if any of the above fails? And perhaps more importantly: What would expect different from just failing your test run?

     


    yahiatene wrote:

    So the point is :

    • - What are the best-practices you have observed in IC integration ? What is your advice ?

    What I have always done is to keep integration tests in a separate project (both in CMS as well as in CI), chain the projects together, and fail that project run if anything goes wrong. When the project fails, a human is going to have go and investigate, regardless of the failure.

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      SiKing, thank you for involving into this conversation. 

       

      Hi yahiatene , perhaps SiKing could provide you with some valuable advice, please give them the info they are inquiring in case you are still looking for help. 

       

      Also, how are things regarding the solution you were going to try, any luck?  

      • yahiatene's avatar
        yahiatene
        Occasional Contributor

        Hi sonya_m,

        The solution was to request the licence manager of ReadyAPI and get the response in a console output.
        The request worked well (see below), but we need a little more information about the licenses manager (existing licenses, available licenses, used licenses), I'm investigating about those statistics and how to get them.

        + /usr/bin/java -jar /opt/tools/ready-api-license-manager/ready-api-license-manager-1.2.6.jar -s IP_adress:port
        [Pipeline] echoLICENSE MANAGER OUTPUT : Please select the tool for which you want to get the floating license:
        1. SoapUI Pro
        2. LoadUI Pro
        3. Secure (if you have an old license)
        4. ServiceV Pro
        5. VirtServer
        Licensed Module: SoapUI Pro
        License Number: [2018-10-31 00:00:00] *****************
        License Type: PROFESSIONAL (floating)
        Issue Date: 31-Oct-2018
        Expiration Date: 25-Jun-2020


        Best regards,
        Mohamed.

    • yahiatene's avatar
      yahiatene
      Occasional Contributor

      Hi SiKing,
      Thank you for your reply, I'll try to be more clear.


      SiKing wrote:

      I am unclear what exactly you are trying to accomplish.

       


      yahiatene wrote:

      Most of tools dispose of “health check” routine that verify that everything is OK before starting the CI pipeline.

      Could you give an example of such a tool?

      For example I worked with Jira and HPQC, with both of them we can check their availability and status with some HTTP requests.

       


      yahiatene wrote:

      So before executing the SoapUI tests in Jenkins I want to verify that :

      1. - TestRunner of ReadyAPI is available
      2. - Licences are available in sufficient quantity
      3. - Each component  of the testing tool is ready to use

      What would you expect to happen in your pipeline if any of the above fails? And perhaps more importantly: What would expect different from just failing your test run?

       

      What I'm trying to do is a model pipeline to launch fake (blank) tests to see the status of readyAPI and it's License Manager.
      For example : if the quantity of licences is insufficient to run the job, the pipeline fails and sends an email to our Tools Expert to check which jobs are using all the licenses. Today we have the console output "No valid license found" just when it fails, and if it's possible we want to have :
      4 floating licences found
      2 used licenses
      2 free licences  

       


      yahiatene wrote:

      So the point is :

      • - What are the best-practices you have observed in IC integration ? What is your advice ?

      What I have always done is to keep integration tests in a separate project (both in CMS as well as in CI), chain the projects together, and fail that project run if anything goes wrong. When the project fails, a human is going to have go and investigate, regardless of the failure.


      So the goal is to make model pipeline, to automate it's run and to do it before production pipeline run.

      Best regards,
      Mohamed.