Topic
  • 5 replies
  • Latest Post - ‏2013-02-22T15:13:01Z by SystemAdmin
SystemAdmin
SystemAdmin
5507 Posts

Pinned topic Custom code with file system configuration files

‏2013-02-07T20:10:53Z |
Is it possible to have RPT automatically deploy additional resource files (used by my custom code) to the file system on remote agents as a test schedule is run?

Alternatively, is there a way to at startup of the entire test read a flat file into a Datapool, which would then be accessible by the agents?
Updated on 2013-02-22T15:13:01Z at 2013-02-22T15:13:01Z by SystemAdmin
  • KMooney
    KMooney
    296 Posts

    Re: Custom code with file system configuration files

    ‏2013-02-10T22:34:01Z  
    Yes, any files that are on the project classpath will be deployed, whether they have to be on the classpath or not. So if you right-click on the project, select Properties, and then Java Build Path click the Libraries tab and add the files you want deployed there.
  • SystemAdmin
    SystemAdmin
    5507 Posts

    Re: Custom code with file system configuration files

    ‏2013-02-21T16:40:21Z  
    • KMooney
    • ‏2013-02-10T22:34:01Z
    Yes, any files that are on the project classpath will be deployed, whether they have to be on the classpath or not. So if you right-click on the project, select Properties, and then Java Build Path click the Libraries tab and add the files you want deployed there.
    Thanks!

    Is the following approach a safe way to accomplish this, as well?

    I created a folder under my bin directory, and put my flat file resources inside there.

    When the test is deployed to the agents, I see that my folder is bundled within the prj1.jar file.

    In my custom Java code I then open that JAR and extract out the file I need.
  • SystemAdmin
    SystemAdmin
    5507 Posts

    Re: Custom code with file system configuration files

    ‏2013-02-21T16:40:24Z  
    • KMooney
    • ‏2013-02-10T22:34:01Z
    Yes, any files that are on the project classpath will be deployed, whether they have to be on the classpath or not. So if you right-click on the project, select Properties, and then Java Build Path click the Libraries tab and add the files you want deployed there.
    Thanks!

    Is the following approach a safe way to accomplish this, as well?

    I created a folder under my bin directory, and put my flat file resources inside there.

    When the test is deployed to the agents, I see that my folder is bundled within the prj1.jar file.

    In my custom Java code I then open that JAR and extract out the file I need.
  • KMooney
    KMooney
    296 Posts

    Re: Custom code with file system configuration files

    ‏2013-02-22T15:03:36Z  
    Thanks!

    Is the following approach a safe way to accomplish this, as well?

    I created a folder under my bin directory, and put my flat file resources inside there.

    When the test is deployed to the agents, I see that my folder is bundled within the prj1.jar file.

    In my custom Java code I then open that JAR and extract out the file I need.
    Not entirely safe. The right thing would be a Request For Enhancement such that RPT provided formal support for deploying arbitrary files and exposed it in the User Interface.

    On the other hand, the way files under bin in the project are bundled for deployment is not likely to change, but counting on it being in prj1.jar is definitely more precarious.
  • SystemAdmin
    SystemAdmin
    5507 Posts

    Re: Custom code with file system configuration files

    ‏2013-02-22T15:13:01Z  
    • KMooney
    • ‏2013-02-22T15:03:36Z
    Not entirely safe. The right thing would be a Request For Enhancement such that RPT provided formal support for deploying arbitrary files and exposed it in the User Interface.

    On the other hand, the way files under bin in the project are bundled for deployment is not likely to change, but counting on it being in prj1.jar is definitely more precarious.
    Thanks. I'll proceed forward accordingly.