Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

RabbitMQ Messaging Client Test failing in Bamboo pipeline

Options
abhaysabu
abhaysabu Posts: 10
edited October 2021 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_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    edited October 2021
    Options

    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.

  • abhaysabu
    abhaysabu Posts: 10
    Options

    @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_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    edited October 2021
    Options

    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.