6 Replies Latest reply: Nov 22, 2012 2:23 AM by 834498 RSS

    OpenScript test execution via Oracle Test Manager on linux environments

    973812
      Hello,

      I have developed a couple of OpenScript tests (Java only) in my development environment (Windows). But I have trouble running those tests via Test Manager (which runs on a linux machine - the production environment) while in OLT they run perfectly fine. We have the newest OATS version installed is 12.1.0.2.

      When I try to run my OpenScript tests (via OTM) I get this error in the process_console log file:

      Exception in thread "Main Thread" java.lang.NoClassDefFoundError: org/eclipse/core/launcher/Main
      Caused by: java.lang.ClassNotFoundException: org.eclipse.core.launcher.Main
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      Could not find the main class: org.eclipse.core.launcher.Main.  Program will exit.

      Does anyone know what could be the problem and how can it be fixed?
      Also, did anyone had any luck running OpenScript tests in linux environments using OTM?

      Any help would be greatly appreciated.

      Best regards,
      Karolis
        • 1. Re: OpenScript test execution via Oracle Test Manager on linux environments
          834498
          Hello Karolis
          As of today, you cannot launch OpenScript script from OTM on Linux. It's on the roadmap but no I have no timing yet.
          Two workarounds:
          1/ you deploy a remote agent on windows
          2/ you create a custom script type of testcase and you use command line to execute a load test script

          <InstalledDir>/jdk/bin/java -jar OLTCommandLine.jar -run -session=test1_ad1 -scenarioFile=/export/.../Test_Ad1.scn -OLTServer=localhost:8088 -user=oats -password=welcome1 -log=/export/.../ad1.log

          Good Luck
          JB
          • 2. Re: OpenScript test execution via Oracle Test Manager on linux environments
            973812
            Hi JB,

            Thank you for the quick response.

            I will be waiting for this functionality to appear under linux installations. For now, both workaround options sound good.

            I have a question about 2/ - did you mean that I can create a test in OTM of type "3rd Party Test" and assign a custom script? Or is there some way of extending OTM? I am asking this because I would like to minimize the complexity of creating these tests (compared to just selecting a OpenScript from a test repository). These tests will be created by testers, who will provide the initial data as an attachment.

            As for 1/ when I first encountered this problem in linux, I tried running OpenScript remotely on windows host, but there was some problem with paths (windows agent tried to execute my OpenScript test in a location that is correct for linux environment, but does not exists in windows). Maybe there is some administrator's guide for such tasks? Is it me, or it is really hard to find documentation on OATS?

            Karolis
            • 3. Re: OpenScript test execution via Oracle Test Manager on linux environments
              834498
              2/ Yes you can assign a custom script. You can even use a regular expression to get the result from standard output and define test status accordingly

              1/ Best is of course to have a shared repository on a Windows (or Linux but with Samba) server, to develop your openscript scripts from there on your windows desktop and then to define in OTM the shared repository in the config.

              About docs, outside the default documentations provided on OTN or in the OATS install dir, there are couple of web sites where you can get some docs and assistance, but I agree, not so much.
              The point with Linux is that it was primarly intended to run Load Testing from where we needed more scalabilty than on Windows. And it's pretty new, so not so much experience/best practices to share.


              JB
              • 4. Re: OpenScript test execution via Oracle Test Manager on linux environments
                973812
                I am trying to do what you suggested - to create a shared repository (windows host), but I am not able to make tests work in OTM (running in linux) when I use windows agent.

                What I managed to do so far is:
                1) OATS installed (in linux environment);
                2) OATS agent installed (in windows environment);
                3) Created a new repository via OpenScript named "ScriptRepository" (windows)
                4) Shared repository folder (windows)
                5) Mounted shared repository location to /mtn/win (linux)
                6) Added new system via OTM (linux)
                7) Added new repository via OTM named "ScriptRepository" (linux)

                When I try to run a test in OTM (using windows agent system and a test from shared repository) it always fails. I get an error in the windows agent log:
                09:59:33,591 ERROR [JWGController] JWG file does not exist: /mnt/win\Test1\Test1.jwg
                09:59:33,599 ERROR [OTMLauncherEntryPoint] Failed to create script package from JWG file null
                <...>

                Am I doing something wrong? Is there some other way to define repository for OTM (not using web UI)?

                I tried doing the same in OLT - it works fine, but OTM takes the repository location from linux environment and tries to use the same location for windows agent ("/mnt/win", which will always be wrong).

                Karolis
                • 5. Re: OpenScript test execution via Oracle Test Manager on linux environments
                  834498
                  Hello Karolis
                  I've posted the question in our internal forum. In the meantime you should maybe open a SR.

                  I'll let you know once I receive some feedbacks.
                  JB
                  • 6. Re: OpenScript test execution via Oracle Test Manager on linux environments
                    834498
                    Hi Karolis
                    Feedback from internal team:
                    The key to getting this to work is to make sure OpenScript's "ScriptRepository" is pointing to a network path (i.e. \\<machine name>\oft). Otherwise replay will fail with the "JWG file does not exist" error. Below are steps required in order to replay OpenScript script from OTM Linux server on a Windows agent.

                    Agent: Windows
                    - Login to the Windows box using named user account (e.g MYSERVER\johndoe)
                    - Make sure ATS Agent and Server services are running as the same named user (e.g MYSERVER\johndoe)
                    - Share the Windows repository folder (e.g. C:\OracleATS\OFT)
                    - Launch OpenScript and add a new repository (e.g ScriptRepository) with the following network path (e.g \\MYSERVER\OFT)

                    Server: Linux
                    - Mount the network path (e.g. \\MYSERVER\OFT) to a share (e.g. /mnt/win)
                    - Create the same OTM repository as defined in OpenScript (e.g. ScriptRepository) and map it to the same network path (e.g \\MYSERVER\OFT)
                    - Add an OpenScript test from "ScriptRepository" repository
                    - Add a windows agent
                    - Execute this script on the remote windows agent

                    They tested this with 12.1.0.1.383 and were able to get it working. Let us know if you still see issues.

                    JB