Forum Discussion

JimLin's avatar
JimLin
Occasional Contributor
13 years ago

Calling different APIs with Maven/Jenkins

Hi, I have searched on this forum and know that this question has been asked in a number of different ways, but I can't find one that seems to fit my issue. I have Googled extensively and can't find an answer that fits there either.

I'm after some advice or suggestions to help me run my regression tests using TestRunner/Maven/Jenkins. I'm using SOAPUI Pro, but posting in the general board as it is not a Pro specific issue (I don't think).

All of my tests are regression tests of some sort and as such do sequential calls against different APIs, i.e. call an Account API to create an account, then use a Payment API to add a credit card and money to the account, make a withdrawal, then call the Account API again to add a limit to the account, etc. These tests and testsuites work fine when run from within SOAPUI, but fail when I run the using TestRunner/Maven/Jenkins. I’ve found out from these forums (5th post down: viewtopic.php?f=5&t=2323), that Test runner will only call one API per test suite, rather than loading the workspace containing all of them. There is a suggested fix, which is to create a test suite which will check whether a workspace is loaded and if not load one, but I’m a bit out of my depth on the Groovy coding, so I’m stuck and unable to progress things. I’m not completely convinced it will completely cure my situation anyway, as other posts go on about reporting issues when doing this.

I wondered whether anyone has encountered this issue before, had any tests similar to this and if so, how you got around it.

Any assistance or advice to help me progress would be greatly received

Cheers,
James

EDIT
I should add that the APIs are located in different projects as well.

2 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    If the testsuite runs from soapui, it should be of no trouble running from testrunner/maven/jenkins.

    Are you running multiple projects? Would it be possible to provide little more details.

    Do you see any errors in the log files when you say fail?

    call an Account API to create an account, then use a Payment API to add a credit card and money to the account, make a withdrawal, then call the Account API again to add a limit to the account, etc. These tests and testsuites work fine when run from within SOAPUI, but fail when I run the using TestRunner/Maven/Jenkins.
  • JimLin's avatar
    JimLin
    Occasional Contributor
    Hi, firstly, my apologies for not replying, I hadn't realised you had replied.

    I have solved my problem to an extent. I had made a fundamental error in not realising that you could add multiple APIs to one project, and had created two projects, one for each API. Once I created a project with both APIs added, I was able to get my tests running after a small amount of Groovy reconfiguration.

    Regards,
    James