RabbitMQ Messaging Client Test failing in Bamboo pipeline

abhaysabuabhaysabu Posts: 3
edited October 5 in SOAtest

Hello
I've a Messaging Client test to validate RabbitMQ messaging queue and it's details, which is working perfectly working as expected locally in SOATest (v10.5.1). I've checked-in the required .jar files (producer, listener and amqpclient) at project level path in to repo and added the references in localsettings.properties as well, like -
system.properties.classpath=./rabbitmqtransport.jar;
system.properties.classpath=./amqpclient.jar;
system.properties.classpath=./rabbitmqlistener.jar;

I've CI/CD pipeline in bamboo to run SOA Tests. All SOA tests are passing, but Messaging Client tests are failing stating -
Failure: Test was not ready and did not run.

Am I missing anything? Let me know if needs anymore details..

Comments

  • benken_parasoftbenken_parasoft Posts: 1,025 ✭✭✭
    edited October 5

    system.properties.classpath=./rabbitmqtransport.jar;
    system.properties.classpath=./amqpclient.jar;
    system.properties.classpath=./rabbitmqlistener.jar;

    You do not specify the same property multiple times. A java property file is like a "map" where you can't have multiple keys with the same value. Instead, you need to define the property once and list the paths in the value like this:

    system.properties.classpath=rabbitmqtransport.jar;amqpclient.jar;rabbitmqlistener.jar
    

    Or you can do this across multiple lines:

    system.properties.classpath=\
    rabbitmqtransport.jar;\
    amqpclient.jar;\
    rabbitmqlistener.jar
    

    A java property file uses backslash as an escape character. For readability, I prefer to use backslash to list each jar on its own line.

    You also need to configure the full path to each jar, contrary to the contrived examples I described above. However, you can also use paths that contain variables like "env_var" and "project_loc" like "${env_var:HOME}" and ${project_loc:TestAssets}", for example.

    As an alternative, instead of configuring the path to each jar in your localsettings.properties file, you can also just add them to the "TestAssets/system_jars" folder in the workspace.

  • abhaysabuabhaysabu Posts: 3

    @benken_parasoft Thanks you for the quick replies! As you suggested, I've updated the localsettings.properties file and tried both ways. First, tried without file-path as below

    system.properties.classpath=\
    rabbitmqtransport.jar;\
    amqpclient.jar;\
    rabbitmqlistener.jar;\

    since it won't work, tried with file-path as below,

    system.properties.classpath=\
    ${project_loc:TestAssets}${env_var:HOMEPATH}system_jars${env_var:HOMEPATH}rabbitmqtransport.jar;\
    ${project_loc:TestAssets}${env_var:HOMEPATH}system_jars${env_var:HOMEPATH}amqpclient.jar;\
    ${project_loc:TestAssets}${env_var:HOMEPATH}system_jars${env_var:HOMEPATH}rabbitmqlistener.jar;\

    In both ways, Message Client Test was not working in bamboo pipeline, and throwing error stating -
    Failure: Test was not ready and did not run.

    Is this the expected error if RabbitMQ Messaging client test won't file associated reference?

  • benken_parasoftbenken_parasoft Posts: 1,025 ✭✭✭
    edited October 5

    First, tried without file-path as below

    I mentioned this won't work. You need to provide the real path to the jars.

    Where did you put your jars? If you put them under "system_jars" then you do not list them in your localsettings.properties file. If you put your jars somewhere else then you would list the paths in "system.properties.classpath".

    Please also note that the last jar in the list should not have a semicolon and a backslash following it.

    Is this the expected error if RabbitMQ Messaging client test won't file associated reference?

    Yes. If a test is missing any required configuration then it can't be run. This error message gets reported any time you try running a test like that, just so you know that the test did not actually run even though you tried to run it.

Sign In or Register to comment.