Friday 27 December 2013

ALM Service Wrapper Part 2

Following is the Example that demonstrates how to use the ALM Service Wrapper.


//How to write

//Step1

Download the JACOB project

Note that, if your machine is either 32 or 64 bit OS, you should use jacob-(version)-x86.dll in your project.

Add the jacob-(version)-x86.dll file in your project Root Directory.
or
Place it in any directory and use the below code to load the DLL file.

System.setProperty("jacob.dll.path""D:\\jacob-1.17-M2-x86.dll");

LibraryLoader.loadJacobLibrary();

NOTE:  Many users are experiencing issues with combination of 64bit JDK+ JACOB 32bit dll.
To avoid this issue, use JDK 32bit on a 64bit machine.




//Step2: The following is the method of writing the code

ALMServiceWrapper wrapper = new ALMServiceWrapper(url);
wrapper.connect(username,password, domain, project);
wrapper.updateResult(pathToTestSetFolder, testSetName, testSetID, testCaseName, result);
wrapper.close();


Example for: Creating New Defect, Adding TestCase Run, Attaching Files, Add Execution Steps


//Tested Code on my machine
ALMServiceWrapper wrapper = new ALMServiceWrapper(    "http://localhost:8081/qcbin");
wrapper.connect("admin""admin""DEFAULT""SampleProject");

wrapper.updateResult("SampleTestSetFolder""TestSet1", 92, "Logout",
                        StatusAs.FAILED);

wrapper.updateResult("SampleTestSetFolder\\SubTestSetFolder1",
                        "TestSet1", 61, "Logout", StatusAs.PASSED);

wrapper.updateResult("SampleTestSetFolder\\SubTestSetFolder1",
                        "TestSet3", 62, "Login", StatusAs.BLOCKED);
wrapper.close();




Screenshot of ALM from my machine




For Test Set ID: Refer to below screenshot. when you click on a Test Set the details can be viewed.




A Full Example using Selenium and TestNG Framework



package test;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import atu.alm.wrapper.ALMServiceWrapper;
import atu.alm.wrapper.enums.StatusAs;
import atu.alm.wrapper.exceptions.ALMServiceException;

public class SeleniumALMIntegrationExample {
      WebDriver driver;

      @BeforeClass
      public void init() {
            driver = new FirefoxDriver();
            driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
      }

      @Test
      public void login() throws InterruptedException, ALMServiceException {
            // Open Wordpress App
            driver.get("http://demo.opensourcecms.com/wordpress/wp-login.php");
            // Enter UserName
            Thread.sleep(3000);
            driver.findElement(By.id("user_login")).clear();
            driver.findElement(By.id("user_login")).sendKeys("admin");
            // Enter Password
            driver.findElement(By.id("user_pass")).clear();
            driver.findElement(By.id("user_pass")).sendKeys("demo123");
            // Click on Submit button
            driver.findElement(By.id("wp-submit")).submit();
            updateResults();
            System.out.println("Done Updating Results");
      }

      public void updateResults() throws ALMServiceException {
            ALMServiceWrapper wrapper = new ALMServiceWrapper(
                        "http://localhost:8081/qcbin");
            wrapper.connect("admin""admin""DEFAULT""SampleProject");
            wrapper.updateResult("SampleTestSetFolder\\SubTestSetFolder1",
                        "TestSet3", 62, "Login", StatusAs.PASSED);
            wrapper.close();
      }
     
      @AfterClass
      public void close(){
            driver.quit();
      }
}

Go To: ALM ServiceWrapper Part 3  - Contains Details regarding Upcoming Releases and Features

154 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I am getting below error
    java.lang.NoSuchMethodError: com.jacob.com.Dispatch.call(Lcom/jacob/com/Dispatch;Ljava/lang/String;[Ljava/lang/Object;)Lcom/jacob/com/Variant;
    at atu.alm.wrapper.classes.TDConnection.initConnectionEx(TDConnection.java:46)
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:75)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:63)
    at Library.GlobalLibrary.connecttoQC(GlobalLibrary.java:1128)
    at TestSuits.QuotePrice.Testcase(QuotePrice.java:327)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    ReplyDelete
    Replies
    1. Hi,

      Make sure that you have loaded the jacob library using below code, and also add the jacob.jar to your build path.

      Ex:
      System.setProperty("jacob.dll.path", "D:\\jacob-1.17-M2-x86.dll");
      LibraryLoader.loadJacobLibrary();

      Regards
      AT

      Delete
  3. I am getting error highlighting the ALMServiceWrapper
    ALMServiceWrapper wrapper = new ALMServiceWrapper(almProperties.getProperty("url"));
    --already attached the jar file and wrote the setproperty and loadjacoblibrary statements.

    ReplyDelete
  4. Can't believe no reply for so many days. Please help!!

    ReplyDelete
  5. I have got the error resolved, to my surprise the jacob project did not contain the ALM Service Wrapper, but now stuck with another issue: I am getting this error even though i have registered the OTAClient.dll (registered from SysWoW64 folder but didnt work so registered with System32 folder, but still didnt work):
    ALM Service Wrapper Exception Details: Please Register the OTAClient.dll with your system
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:84).

    Please help!!!!!

    ReplyDelete
    Replies
    1. Hi,

      We are involved in many other projects due to which we could not reply quickly, this usually doesn't happen unless the team is completely busy.

      Answering to your questions:

      The Jacob project does not contain the ALM Service Wrapper API, Jacob itself is a different project. The ALM Service Wrapper is developed by us(ATU Blog Contributors), you have to download this API from the links provided in the blog.

      If your OS is 64 bit, then the OTAClient.dll must be registered from System32 folder. I have updated the ALM Service Wrapper Part 1 post which describes how to register the dll in a 64bit machine.

      Once it is registered, you can use the API to interact with QC/ALM.

      Note that, if your machine is either 32 or 64 bit OS, you should use jacob-(version)-x86.dll in your project.

      Regards
      AT

      Delete
    2. Hi Am not getting any link for ALM Service wrapper, Could you please help me i need in urgent

      Delete
  6. I have this error even that i follow all the instructions: the problem of 64 bit sustem and 32 bits jacob.
    java.lang.UnsatisfiedLinkError: C:\Users\i.chok\Downloads\jacob-1.17\jacob-1.17\jacob-1.17-x86.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary1(Unknown Source)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.load0(Unknown Source)
    at java.lang.System.load(Unknown Source)
    at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:151)
    at com.jacob.com.JacobObject.(JacobObject.java:107)
    at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:149)
    at com.selenium.qc.TestSeleniumQC.updateResults(TestSeleniumQC.java:64)
    at com.selenium.qc.TestSeleniumQC.test(TestSeleniumQC.java:58)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

    ReplyDelete
    Replies
    1. It's done i fix it , i change the jre to 32 bits

      Delete
  7. "The ALM Service Wrapper is developed by us(ATU Blog Contributors), you have to download this API from the links provided in the blog.", Where is the link provided to download ALM Service Wrapper in this blog?

    ReplyDelete
    Replies
    1. You should be able to find In the main page of ALM Service Wrapper.

      #AT

      Delete
  8. Everything is working fine. Thank you for the wonderful work. Is there any way I can select a different parameter in arg4 from "tcName" to some other column like testConfig?

    "wrapper.updateResult (arg0. arg1, arg2, arg3, arg4, arg5)

    ReplyDelete
    Replies
    1. Hi,

      The API accepts the tcname as its parameter. You can check the javadocs for complete API.

      #AT

      Delete
    2. I was going through API docs. Do you recommend to use any other methods to approach for this solution?

      Delete
    3. Do you think I can get more flexibility to select or filter out based on what columns I need using TestSetTreeManager or ListWrapper? Anyhelp to point me out to the right direction is really appreciated. My projcet just need to update status based on Test Config Name as arg4. Really appreciated your reply.

      Delete
    4. The ALM Service Wrapper is built around certain entities of QC/ALM OTA API. Accepting TC Name as the parameter is the generic approach for updating result of a particular Test Case.

      For your question i would like to know how does the Test Config help in achieving your task - Can you describe a little more on this ?

      #AT

      Delete
  9. I was excited to discover this great site. I wanted to thank you for your time for this particularly wonderful
    read!! I definitely appreciated every little bit
    of it and I have you bookmarked to look at new information in your website.


    my web-site buy cialis in ireland

    ReplyDelete
  10. hi, i am unable to import the atu.alm service wrappers and other atu library. can you help please

    ReplyDelete
  11. import atu.alm.wrapper.ALMServiceWrapper;

    import atu.alm.wrapper.enums.StatusAs;

    import atu.alm.wrapper.exceptions.ALMServiceException;

    ReplyDelete
  12. the ecplise is not able to resolve the the above mentioned imports

    ReplyDelete
  13. i am using a junit framework

    ReplyDelete
    Replies
    1. Please add the ALM Service Wrapper to your build path !!!

      #AT

      Delete
  14. thanks, i have done all the steps metioned above. Eclipse is throwing an error OTAClient.dll not registered. i have tried unregistering and registering again. it is still behaving the same. please give suggestion

    ReplyDelete
    Replies
    1. If your machine is 64bit then use JDK (java) 32bit version.

      #AT

      Delete
  15. getting following error, please help:
    "main" java.lang.NoSuchMethodError: com.jacob.com.JacobObject.debug(Ljava/lang/String;)V
    at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:149)

    ReplyDelete
    Replies
    1. Hello Hari,

      Some older versions of the Jacob library doesn't have the api methods that are required for ALM Service Wrapper - Hence this error. which version of jacob jar are you using ? have to tried using the jar that is included in the sample project ?

      #AT

      Delete
  16. hi, Eclipse is throeing a error unable to establish connection for the URL (https://....)
    please help

    ReplyDelete
    Replies
    1. Give the complete path https://..../qcbin
      Also make sure that your connection is not dry - no firewall issues - and setup code for proxy network.

      #AT

      Delete
    2. hi,
      can you please tell me how to do the above - ensuring connection is not dry and how to setup code for proxy network. or atleast give me hints or provide a link.
      thanks

      Delete
    3. Check your network connection - if you can access ALM through Browser. Also check with java's HttpConnection class.
      If you are in a proxy network use the below code for setting proxy property.


      System.setProperty("http.proxyHost", "proxyname");
      System.setProperty("http.proxyPort", "proxyport");

      or

      System.setProperty("https.proxyHost", "proxyname");
      System.setProperty("https.proxyPort", "proxyport");

      The complete ALM url must be given as a parameter to ALMServiceWrapper instance : https://..../qcbin

      #AT

      Delete
    4. Hi,
      First of all I would like to thank you for yopur efforts in creating such a nice project.
      I am also facing the same issue when I run the code. It says unable to connect to URL. I have tried all the solutions given in this thread. Please find the detailed description of the error given below.
      ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL: http://qc.int.**********.com/qcbin/

      Note: Instead of star there is my company name.

      Thanks in Advance,
      Shivanshu

      Delete
    5. Please note that you have the TD Connector installed in your system. Without this you may not be able to connect to QC/ALM

      #AT

      Delete
    6. Hi,

      Could you please explain what do you mean by TD Connector in the above comment.

      I am facing the same issue. Thanks in Advance.

      Regards,
      Vinay

      Delete
    7. Hi All,

      Solution for the above issue:-

      1-Search for "tdconnect.exe" in your computer and delete all the tconnector.exe ,if you have any in ur system.
      2-Go to ALM home page and select tools option
      3-Download HP ALM Connectivity tool and install it.
      4-Register OTAClient.dll file from Command Prompt as mentioned in first part of this post.
      5-Give the full url till\qcbin

      It should work fine now.

      Delete
  17. Hi, on running the update to ALM script i am getting the following error:

    # A fatal error has been detected by the Java Runtime Environment:
    #
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1a45b6e3, pid=10472, tid=11948
    #
    # JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13)
    # Java VM: Java HotSpot(TM) Client VM (24.51-b03 mixed mode windows-x86 )
    # Problematic frame:
    # C [OTAClient.dll+0xcb6e3]
    #
    # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

    please help

    ReplyDelete
  18. # A fatal error has been detected by the Java Runtime Environment:
    #
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x1a45b6e3, pid=10472, tid=11948
    #
    # JRE version: Java(TM) SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13)
    # Java VM: Java HotSpot(TM) Client VM (24.51-b03 mixed mode windows-x86 )
    # Problematic frame:
    # C [OTAClient.dll+0xcb6e3]
    #
    # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

    please give solution for aboveahown error

    ReplyDelete
    Replies
    1. what are you trying to do ? when do you face this exception ?

      #AT

      Delete
    2. I want to raise the defect in QC from Selenium. right Now I used ALMServiceWrapper but am not able to see the right method or API in this.Please suggest me on this.Your help is highly appreciated.

      Delete
    3. this error was generated when the execution tries to connect to ALM

      Delete
    4. This looks more like a JVM crash, you could uninstall and re install JDK. If it does not work try downgrading your JDK to v6.

      #AT

      Delete
  19. Hi AutomationTester,

    I got an issue below while connecting to HP QC:Please kindly help me in this

    Exception in thread "main" java.lang.NoSuchFieldError: m_pDispatch
    at com.jacob.com.Dispatch.createInstanceNative(Native Method)
    at com.jacob.com.Dispatch.(Dispatch.java:101)
    at com.jacob.activeX.ActiveXComponent.(ActiveXComponent.java:58)
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:72)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:63)
    at Qcconnect.main(Qcconnect.java:29)

    ReplyDelete
    Replies
    1. Hello Venkat,

      Some older versions of the Jacob library doesn't have the api methods that are required for ALM Service Wrapper - Hence this error. which version of jacob jar are you using ? have to tried using the jar that is included in the sample project ?

      #AT

      Delete
    2. Thank you so much.it's working

      Delete
    3. Hi Venkat

      I am also facing the same issue which you got. what you did to resolve the issue? pls reply.

      Delete
  20. This comment has been removed by the author.

    ReplyDelete
  21. I want to raise the defect in QC from Selenium. right Now I used ALMServiceWrapper but am not able to see the right method or API in this.Please suggest me on this.Your help is highly appreciated.

    ReplyDelete
    Replies
    1. Hello Venkat,

      Follow this link for Examples of creating defect, adding steps etc :

      http://automationtestingutilities.blogspot.in/2014/06/CreatingNewDefectNewRunAttachingFilesAddSteps.html

      #AT

      Delete
    2. thank you .but am getting undefined method.in the below line
      IDefect defect = wrapper.newDefect();

      ALMserviceraperjar1.0 version is used .Please advice

      Delete
    3. I have downloaded latest version and it has all the needy.

      Thanks alot for the great support

      Delete
    4. I got the below isuue .could you please help

      log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager).
      log4j:WARN Please initialize the log4j system properly.
      Exception in thread "main" com.jacob.com.ComFailException: Invoke of: AddItem
      Source:
      Description: Parameter Type is Invalid

      at com.jacob.com.Dispatch.invokev(Native Method)
      at com.jacob.com.Dispatch.invokev(Dispatch.java:625)
      at com.jacob.com.Dispatch.callN(Dispatch.java:453)
      at com.jacob.com.Dispatch.call(Dispatch.java:541)
      at atu.alm.wrapper.classes.Bug.init(Bug.java:29)
      at atu.alm.wrapper.classes.Bug.(Bug.java:21)
      at atu.alm.wrapper.classes.BugFactory.addItem(BugFactory.java:26)
      at atu.alm.wrapper.ALMServiceWrapper.newDefect(ALMServiceWrapper.java:240)
      at Qcconnect.main(Qcconnect.java:46)

      error code: IDefect defect = wrapper.newDefect();

      Delete
    5. Hi AT

      Please kindly help me in this

      Delete
    6. Hello Venkat,

      This API has been tested against ALM and works fine - we expect it to work with QC as well. As you are working with Quality Center, could you see if there is any permission that has to be set in Quality Center ?

      #AT

      Delete
    7. HI AT

      I am able to raise the defect from client.but not able to it from this.

      code is as below;
      ALMServiceWrapper wrapper = new ALMServiceWrapper("http://qualitycenter.cisco.com/qcbin/");
      // wrapper.connect(username, password, domain, project)
      // wrapper.updateResult(arg0, arg1, arg2, arg3, arg4)

      wrapper.connect("","","","");
      IDefect defect = wrapper.newDefect();
      defect.isReproducible(true);
      defect.setAssignedTo("nisyed");
      defect.setDetectedBy("rkusupud");
      defect.setDescription("My Defect sample");
      defect.setDetectionDate("06/17/2013");


      defect.setPriority(DefectPriority.HIGH);
      defect.setSeverity(DefectSeverity.MEDIUM);
      defect.setStatus(DefectStatus.OPEN);
      defect.setSummary("My Defect/Bug Summary");
      System.out.println(defect.getDefectID());

      is there any issue with code

      Delete
    8. Hi,

      There should not be any issues with the above code unless there is some missing field in QC and which is available in ALM. Instead of adding all the fields as done above, try to set only certain fields which are in QC and see if it works.

      #AT

      Delete
    9. Hi AT
      I am trying to ALM only and search for mandatory feilds

      defect.setDetectedBy("rkusupud");
      defect.setDetectionDate("06/18/2014");
      defect.setSeverity(DefectSeverity.MEDIUM);
      defect.setSummary("My Defect/Bug Summary");

      I set only those fields. Bug table of ALM has these Mandatory feilds ,But unfortunately it still giving me the same error.could you please suggest me on this.

      Delete
    10. Hi,

      Were you able to resolve the issue? I get the same error.

      Thanks

      Delete
    11. Hi,

      Could you please help me. I am also getting the same error. Please confirm if we need to do any setting in ALM?

      Thanks

      Delete
  22. Hi,
    I am using Data Driven framework including Testng in it in eclipse using java.Now I want to execute my selenium test cases through ALM.
    Question 1.Can we execute selenium Test scripts directly from ALM with out opening eclipse or else tell me how to execute test cases.

    Question 2.In the same page above you have said that we need to download "jacob project" , after downloading should I need to attach that particular "jacob project" ? what and where can I use this Jacob project folder. please let me know.

    Question 3.Can you please tell me how to add this Jacob project folder to eclipse.

    Thanks

    ReplyDelete
    Replies
    1. Hello,

      1. Yes, you can execute through ALM using VXAPI feature - try ALM's help file to understand its usage
      2. After downloading the JACOB, add the jar file to your eclipse build path
      3. A simple google search "how to add jar files to eclipse build path" should help you

      #AT

      Delete
  23. As per my understanding it will just update the results of every testcase in QC know?

    ReplyDelete
    Replies
    1. There is more to it..

      It can Update Results, Create Defects, Add Execution Steps and much more.
      for list of features. visit below link.,

      http://automationtestingutilities.blogspot.in/2013/12/IntegrationWithQCorALMusingALMServiceWrapperPart3.html

      #AT

      Delete
  24. i am getting the installation page while trying to login to the ALM. where as i am able to login into it mannually. i am not sure how to over come this. i tried clicking on the install button but it is not working.
    please help

    ReplyDelete
    Replies
    1. When you open QC/ALM in IE browser for the first time - It will require certain components to be available in your machine - It will download all the required files. If this is unsuccessful, you cannot access QC/ALM in your machine.

      #AT

      Delete


  25. Anonymous17 June 2014 22:58

    hi,
    can you please tell me how to do the above - ensuring connection is not dry and how to setup code for proxy network. or atleast give me hints or provide a link.
    thanks

    ReplyDelete
    Replies
    1. A reply has been provided to your query in the above comments !!

      #AT

      Delete
  26. Hello Guys,

    I have done all the steps mentioned above. Eclipse is throwing an error "ALM Service Wrapper Exception Details: Please add the jacob-(version-bit-type).dll file to the System path".

    Please help.


    ALM Service Wrapper Exception Details: Please add the jacob-(version-bit-type).dll file to the System path
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:107)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:74)
    at test.SeleniumALMIntegrationExample.updateResults(SeleniumALMIntegrationExample.java:49)
    at test.SeleniumALMIntegrationExample.login(SeleniumALMIntegrationExample.java:42)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
    at org.testng.TestRunner.privateRun(TestRunner.java:767)
    at org.testng.TestRunner.run(TestRunner.java:617)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
    at org.testng.SuiteRunner.run(SuiteRunner.java:240)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    ReplyDelete
    Replies
    1. Please add the jacob dll to your classpath Or you can load it by yourself using the code as shown in the post.

      #AT

      Delete
    2. Hello Admin,

      Even after registering the OTAClient.dll file.. I am getting the below exception:
      ALM Service Wrapper Exception Details: Please Register the OTAClient.dll with your system

      OS: Windows 7, 64 bit

      Thanks in advance.

      Delete
    3. Hello,

      Are you working with 64bit java ? Please use Java 32bit variant to resolve the issue.

      #AT

      Delete
    4. Thanks AT !! U guys really Rock :)

      After installing jdk1.7.0_60 32 bit and jacob-1.18-M2-x86.dll it workiing fine now.

      It would be really good if we could support 64 bit as well..

      Delete
  27. Hi AT...

    After executing the scripts, the over all Test status is changed to "Passed " or "Fail".
    The individual Steps still show as "No Run".

    Could u plz suggest using which class we can pass/fail the steps as well.

    ReplyDelete
  28. Do you guys have a way to create new folders, tests, and test sets from the api?

    ReplyDelete
  29. Hi getting the below issue
    Exception in thread "main" java.lang.NoSuchFieldError: m_pDispatch
    at com.jacob.com.Dispatch.createInstanceNative(Native Method)
    at com.jacob.com.Dispatch.(Dispatch.java:101)
    at com.jacob.activeX.ActiveXComponent.(ActiveXComponent.java:58)
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:72)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:63)
    at Qcconnect.main(Qcconnect.java:29)

    using the same dll which used for example program
    unable to connect to ALM

    ReplyDelete
  30. This is great stuff! Thank you for sharing your project. Would you have ideas/help on how to create a custom test type in ALM. So rather than mapping these wrapper calls to a "Manual" test type, they would be mapped to a "Selenium" test type?

    ReplyDelete
  31. Hi I am getting the below issue :-

    Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\jacob-1.17-M2-x86.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.load0(Unknown Source)
    at java.lang.System.load(Unknown Source)
    at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:151)
    at com.jacob.com.JacobObject.(JacobObject.java:107)
    at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:149)
    at test.ALMSeleniumIntegration.main(ALMSeleniumIntegration.java:25)

    ReplyDelete
  32. Hi,
    Thanks for sharing your project...
    I have followed the steps u mentioned in your blog...Even the same code had worked fine when I run the code in one machine..But now, that code is throwing an error when I tried in some other machine...The error is

    ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL:
    at atu.alm.wrapper.classes.TDConnection.initConnectionEx(TDConnection.java:48)
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:101)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:74)
    at SampleTest.main(SampleTest.java:16)

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Hi,
      Even i am getting same error. Whether we need admin access in Quality Center for running the code..

      Delete
  33. Hi,
    Even i am getting same error. Whether we need admin access in Quality Center for running the code..

    ReplyDelete
  34. Hi,

    Does the ALM Service wrapper work with ALM 12.
    I am getting the following error even after trying to install the TDConnect in my system.
    Exception in thread "main" ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL: http://localhost:8080/qcbin
    at atu.alm.wrapper.classes.TDConnection.initConnectionEx(TDConnection.java:48)
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:101)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:74)
    at com.QC1.QcIntegration.main(QcIntegration.java:21)

    Selecting to install TDConnect.exe gives me an error message that 'Installation is unsuccessful'.

    Please clarify.

    Thanks in Advance,
    Vinay

    ReplyDelete
  35. Hi
    I tried in all ways to solve this issue. with proxy and what ever above comments

    could you please response ASAP, if you have solution

    Exception in thread "main" ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL:

    ReplyDelete
  36. Hi All,

    I too facing the same issue

    loaded Jacob 1.18 and ATU_ALM_ServiceWrapper_2.0 in nuild path.

    But getting the error as

    ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL: https://alm.qc.xxx.com/qcbin/
    at atu.alm.wrapper.classes.TDConnection.initConnectionEx(TDConnection.java:48)
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:101)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:74)
    at test.SeleniumALMIntegrationExample.updateResults(SeleniumALMIntegrationExample.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

    kindly clarify this one ASAP.

    ReplyDelete
    Replies
    1. When i enter the QC10 URL , it was working good..
      For ALM 12 i am getting this error "ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL: https://alm.qc.xxx.com/qcbin/"
      Do u we have any update on ALM 11,12 version.

      Delete
  37. Hi there, firstly this is spectacular for those implementing Selenium with Java.

    I tried running the sample project with ALM11. Get the below error:

    Looks like many are seeing the same error. Is there any response on this page anymore?

    Exception in thread "main" ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL: http://qaapp01.companyname.local:8443/qcbin
    at atu.alm.wrapper.classes.TDConnection.initConnectionEx(TDConnection.java:48)
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:101)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:74)
    at test.ExampleToUpdateResults.createDefect(ExampleToUpdateResults.java:54)
    at test.ExampleToUpdateResults.main(ExampleToUpdateResults.java:26)

    ReplyDelete
  38. Hello Admin,

    I am not able to use the code:

    System.setProperty("jacob.dll.path", "D:\\jacob-1.17-M2-x86.dll");
    LibraryLoader.loadJacobLibrary();

    Does LibraryLoader require an import statement I am missing?

    ReplyDelete
  39. Hello Admin,

    I am getting error :
    ALM Service Wrapper Exception Details: Please add the jacob-(version-bit-type).dll file to the System path
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:107)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:74)
    at com.automation.Util.Report.createQCConnection(Report.java:257)
    at com.automation.suteLogin.LoginTest.testLogin(LoginTest.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)

    As per your suggestion above, I am not able to use the code:

    System.setProperty("jacob.dll.path", "D:\\jacob-1.17-M2-x86.dll");
    LibraryLoader.loadJacobLibrary();

    Does LibraryLoader require an import statement I am missing? Can you please suggest, this is very urgent...

    ReplyDelete
  40. Hi AT,

    When I am uploading a word/pdf document to QC with the following code, I am seeing the attachment uploaded as 0 KB. I saw the same issue being reported earlier in the blog. Is this resolved?

    wrapper.newAttachmen

    ReplyDelete
  41. Hi Team,

    I followed your steps, later during execution i am getting the below error
    "Exception in thread "main" java.lang.NoSuchFieldError: m_pDispatch"

    Could you please help me here.

    Thanks,

    Manohara.KS

    ReplyDelete
  42. Hi,

    How do we implement updating the test case results (Built using ALM BPT)

    Thanks
    Ramesh.

    ReplyDelete
  43. Hi AT,

    After installing jdk1.7.0_60 32 bit and jacob-1.18-M2-x86.dll it workiing fine now.

    But do we have any solution for using JDK 1.7 64 bit??

    ReplyDelete
  44. Hi AT,

    When using newAttachment() function to attach the files in ALM, file updated for the testset but when i tried to open it showing 0kb,

    is this issue fixed???

    ReplyDelete
  45. Hi Automation Tester,

    Could you please help me to install jacob on a linux box? I have downloaded jacob & also created simlink to /usr/lib. Now could you please let me know that next should I do to have "Selenium-test" in drop down while creating new tests on ALM.

    ReplyDelete
  46. Hi, I couldn't resist but post this comment: This feature (Selenium - ALM integration) was very important for our project. I followed all the guidelines and actions suggested by Automation Tester, verbose, and the stuff works perfectly for me. Kudos to AT for having done this brilliant work and sharing it cus it is helping the automation testing community and people can take up more challenging tasks at work! Thanks a million. regards, AB.

    ReplyDelete
    Replies
    1. Hi I am facing issue..
      in step 2 at
      LibraryLoader.loadJacobLibrary();

      Delete

  47. I am facing issue while connecting to ALM form java.

    i followed your blog automationtestingutilities

    1.part 1 - Done
    2.Part 2 getting error in eclipse

    System.setProperty("jacob.dll.path", "D:\\jacob-1.17-M2-x86.dll");

    LibraryLoader.loadJacobLibrary();

    I am getting error " cannot
    resolve" for the above line of code.



    Please suggest

    I am om 32 bit O/s using 32 bit JDK on my machine.


    Thanks and appreciate you time.

    ReplyDelete
  48. Hi ,

    I have followed the instruction you gave.Registered the OTAClient.dll and used the piece of code you gave in your example.

    My issue is my testcase in ALM is not being updated.I am not getting any error on console, the test runs successfully except that the result is not updated in ALM.

    I have set my ALM url and credentials ,testcaseID and so on .. I am using ATU_ALM Service Wrapper ( v2.0 ).

    Could you please help me out to know why the result is not being updated to QC and is there any way to figure out whether the connection to AM was successful ?

    Thank you.

    ReplyDelete
    Replies
    1. Please note I am making use of HP ALM - 12.20

      Delete
    2. I am experiencing the same issue.Were you able to solve it?

      Delete
  49. HI Team,

    I am getting the below error when I try to establish connection with the QC ALM. Please assist.

    ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL: http://dwvappa001:8080/qcbin

    ReplyDelete
  50. Hi I have registered the OTAClient.dll with my system and got success message as well, but when i run the program SeleniumALMIntegrationExample i got the error message as FAILED: login
    ALM Service Wrapper Exception Details: Please Register the OTAClient.dll with your system, even though i registered. I could not able to move further, could you please help me to get rid of this error, i need to finish this task immediately.

    Thanks,
    Mgs

    ReplyDelete
  51. I have followed the steps mentioned by you. I didn't get any error messages. I twinned the ALM service wrapper with my Test. Upon execution, the test runs normally and passed. But I don't see ALM being launched. ALM runs only in IE. Do we need to mention this in the code.Please advise.
    Environment information:
    ALM 12
    32 bit OS
    I did configure jacob.jar and ATU_ALM_ServiceWrapper_2.0.jar into my buildpath.

    ReplyDelete
  52. hi AT,

    I am seeing the attached files are showing as zero KB in ALM.
    Can you please advise here ?

    Thanks,
    Samar

    ReplyDelete
  53. Hi AT,

    is there any way i can update the existing steps in ALM for a test case executed using selenium ?
    Though i am able to add steps but i do not want to add steps as my test case in ALM already has steps.SO just want to update the existing steps.
    Appreciate quick response !

    Thanks,
    Samar

    ReplyDelete
    Replies
    1. Hi Samar,
      I got the same issue of zero KB in ALM attachment. Do you get work around for both query(Attachment as well update steps)? please advise.

      Dhaval Shah

      Delete
  54. Can this be used for VSTS testing center, please let me know

    ReplyDelete
  55. Valuable piece , Incidentally if people have been needing a It 565 form , my kids found a template document here http://goo.gl/jpqeKA

    ReplyDelete
  56. hi, the code is showing that it cannot find the class path.
    please help i am using latest qc version

    ReplyDelete
  57. Hi, My system is 64bit Win 7 and I am using 32bit JDK as mentioned and performed all the processes. I am trying to connect to ALM 12.50.

    But I am getting the below error when i run my script:

    ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL: http://****:****/qcbin/

    Any help on how to overcome this please ?

    ReplyDelete
  58. Is there any way to update the existing Test Steps status for a Test case run ? If yes,how to proceed ?

    ReplyDelete
  59. Hello I am have a 32 bit windows machine. Installed TD connector, registered otaclient dll, just wanted to update the test case result to ALM 11.52 and now it says invalid username or password. I am using selenium-java. I can login manually.

    ReplyDelete
    Replies
    1. I got this problem when I used the trial version of HP ALM

      Delete
  60. Am not able to use the ALMServiceWrapper .Kindly help out.

    ReplyDelete
  61. Hi AT, I have emailed you on automationtestingutilities@gmail.com, but didn't get any revert.
    Please revert on that.
    Thanks!

    ReplyDelete
    Replies
    1. earlier I was getting Connection related problems, but they have been resolved after running tdConnect.exe.
      Now I am getting further exceptions : Object is locked by {userName}.
      Please help me in resolving this issue.

      Delete
    2. INFO : To access ALM, I have to connect to the VPN.
      Can this be the reason that I am getting exception : Object locked by {userName} as the request exceeds time limit ?

      Delete
  62. I am getting error while logging the defect :
    My code -

    ALMServiceWrapper wrapper = new ALMServiceWrapper(
    "http://....../qcbin/");
    wrapper.connect("username", "password", "Domain", "project")
    IDefect defect1 = wrapper.newDefect();


    used jacob-1.18 & ATU_ALM_ServiceWrapper_2.0.jar

    Getting error -

    com.jacob.com.ComFailException: Invoke of: AddItem
    Source:
    Description: Parameter Type is Invalid

    ReplyDelete
  63. This comment has been removed by the author.

    ReplyDelete
  64. Hi AT,
    I am getting below error ALM Service Wrapper Exception Details: The Given Test Set Name "Test" Not Found. I think, I am able to access folder path but not test set. I am using ALM 12.50 where we customized ALM and not find test set ID filled in Test LAB.Is any one can help?

    Dhaval Shah

    ReplyDelete
  65. http://automationtweak.blogspot.in/2017/03/update-execution-status-of-test.html

    ReplyDelete
  66. Hi AT,
    I have registered ota.dll and finished with your part-1 steps. But when i copy pasted your sample code, getting error at ALM service wrapper exception and I am nt able to import the below:
    import atu.alm.wrapper.ALMServiceWrapper;
    import atu.alm.wrapper.enums.StatusAs;
    import atu.alm.wrapper.exceptions.ALMServiceException;

    Please suggest me, what else i need to add to resolve this..and i will be so thankful if u provide link to downlaod that...because I am nt able to downlaod service wrapper jars

    Thanks,

    ReplyDelete
  67. Hi ,
    I am getting this error "Exception in thread "main" ALM Service Wrapper Exception Details: Invalid Username or Password"

    and If run manually HP QC on our machine, i used to give my username as "whatever my username is " and in password fields as blank. so i m passing blank in the password feild in code. Can anyone please suggest ?

    ReplyDelete
    Replies
    1. it is giving me this error :

      Exception in thread "main" ALM Service Wrapper Exception Details: Invalid Username or Password
      at atu.alm.wrapper.classes.TDConnection.login(TDConnection.java:67)

      I have installed TD connector successfully as well.

      Delete
    2. I am getting the same error, and have QC working properly thru other API calls. Please let me know what might be causing this error with valid credentials supplied:

      ALM Service Wrapper Exception Details: Invalid Username or Password
      at atu.alm.wrapper.classes.TDConnection.login(TDConnection.java:67)
      at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:102)
      at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:74)

      Delete
    3. This comment has been removed by the author.

      Delete
  68. I was able to get by the Invalid Username or Password error. It appears the QC servers were upgraded and needed to download new versions of the dlls.

    ReplyDelete
  69. In HP UFT we have a Test Lab Test Execution Step status = micWarning, which will set the Step Status = Warning.
    How can we do this with the ALM ServiceWrapper? I don't see that status.

    For example:
    wrapper.addStep(testRun, "Step Name", StatusAs.WARNING, "my Description", "exp", "actual");

    ReplyDelete
  70. Hi ATU,

    I'm getting the below error.

    com.jacob.com.ComFailException: Invoke of: Status
    Source:
    Description: You do not have the required permissions to execute this action.

    at com.jacob.com.Dispatch.invokev(Native Method)
    at com.jacob.com.Dispatch.invokev(Dispatch.java:625)
    at com.jacob.com.Dispatch.invoke(Dispatch.java:498)
    at com.jacob.com.Dispatch.put(Dispatch.java:580)
    at atu.alm.wrapper.classes.TSTest.putStatus(TSTest.java:42)
    at atu.alm.wrapper.ALMServiceWrapper.updateResult(ALMServiceWrapper.java:138)
    at test.SeleniumALMIntegrationExample.updateResults(SeleniumALMIntegrationExample.java:56)
    at test.SeleniumALMIntegrationExample.login(SeleniumALMIntegrationExample.java:48)

    Please help me.

    ReplyDelete
  71. Hi ATU Team,

    I am getting the same error as above in method createTestCaseRunAndTestCaseExecutionSteps() esp. when trying to add test step for the run using the example code "Create a new Run, Add the Steps for this Run and Attach a File"

    Exception in thread "main" com.jacob.com.ComFailException: Invoke of: Name
    Source:
    Description: You do not have the required permissions to execute this action.

    Can anyone of you please help ? What could be the reason ? It successfully updated the test case status for the example code which updates "// Update Test Case Result and Attach a File " section but throws the above error for code which "//Create a new Run, Add the Steps for this Run and Attach a File". I am not sure why it has permission to update status but not to add test steps and update it ??

    ReplyDelete
  72. Dear Friends,

    Im stuck in the very beginning stage. Im unable to find the OTACLIENT.DLL at all.

    I enabled the hidden AppData (C:\Users\karaja****\AppData\Local\HP\ALM-Client\svmdc2***\merged-setup_a) folder and wasnt able to find the .dll file.

    However, I did notice the OTACLient info in the file 'merged-setup_a' (Config file ?).

    ShortName=OTAClient.dll
    URLName=%URL%/Install/OTAClient.lld


    Also, I tried the command regsvr32 OTACLIENT.dll and encountered the below exception.

    The Module 'OTACLIENT.dll'
    make sure the binary is stored at the specified path '
    The specified module could not be found


    Sorry If im missing something in here. Your response would be greatly appreciated.

    Kind regards,
    Karthik

    ReplyDelete
    Replies
    1. can anyone shed some light on this please?

      Kind regards,
      Karthik

      Delete
  73. Hi Automation Tester, I am able to successfully use it at my work and all team members ready to use it for all our apps. My company security team DO NOT Approve any open source without source code. Can you please point me source code for ALM Wrapper? Thanks, Jigisha

    ReplyDelete
  74. http://automationtweak.blogspot.in

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Go through this blog. Platform Independent solution it is and I think is the best one too. 👍🏻

      Delete
  75. Can anyone help me on, how to create test case by using JACOB. i am seeing only update test case, test run, defect only..but i didnt find any test case creation. please help me on this. a bit urjent

    ReplyDelete
  76. Hi,

    I must congratulate you guys for
    creating this wonderful easy library to use the QC OTA API.

    I am having a problem with your ALMServiceWrapper.
    I found that one of the Dispatch call is not working when trying to create a new Bug.

    Here are the statements :

    Dispatch bugFactory = Dispatch.call( activexObject, "BugFactory").toDispatch();
    Dispatch bug = Dispatch.call( bugFactory, "AddItem", new Object[]{""} ).toDispatch();

    The call to "AddItem" complains of wrong type. Here is the exception message :

    Exception in thread "main" com.jacob.com.ComFailException: Invoke of: AddItem
    Source:
    Description: Parameter Type is Invalid

    My HP ALM version is 12.01.
    Using 1.18 of Jacob Java-COM bridge.

    Any help will be gratefully appreciated.

    cheers,
    jay

    ReplyDelete
  77. Hi,

    Thank for the great work. I am also facing Invoke of: AddItem

    FAILED: login
    com.jacob.com.ComFailException: Invoke of: AddItem
    Source:
    Description: Parameter Type is Invalid

    at com.jacob.com.Dispatch.invokev(Native Method)
    at com.jacob.com.Dispatch.invokev(Dispatch.java:625)
    at com.jacob.com.Dispatch.callN(Dispatch.java:453)
    at com.jacob.com.Dispatch.call(Dispatch.java:541)


    Please help.

    Thanks,
    Shrey

    ReplyDelete
  78. "Nice and good article.. it is very useful for me to learn and understand easily.. thanks for sharing your valuable information and time.. please keep updating.php jobs in hyderabad.
    "

    ReplyDelete
  79. I have followed the steps mentioned exactly.Still getting compilation error . package atu.alm.wrapper does not exist .Can anyone please help me.

    ReplyDelete
  80. Hi,

    I have a basic question, will the update results method update only Passed results or will it do for pass and fail both?

    ReplyDelete
  81. how to execute selenium script using ALM

    ReplyDelete
  82. This comment has been removed by the author.

    ReplyDelete
  83. This comment has been removed by the author.

    ReplyDelete
  84. I have done everything but i am not able to run the test cases automatically in ALM. How can I integrate with this.

    ReplyDelete
  85. I am getting below error. Working on 64 bit machine. Please help.
    LM Service Wrapper Exception Details: Invalid Username or Password
    at atu.alm.wrapper.classes.TDConnection.login(TDConnection.java:68)
    at atu.alm.wrapper.ALMServiceWrapper.connectToOTA(ALMServiceWrapper.java:76)
    at atu.alm.wrapper.ALMServiceWrapper.connect(ALMServiceWrapper.java:63)
    at sel.c3.updateResults(c3.java:46)
    at sel.c3.login(c3.java:40)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
    at org.testng.internal.Invoker.invokeMethod(Invoker.java:663)
    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:849)
    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1157)
    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
    at org.testng.TestRunner.privateRun(TestRunner.java:771)
    at org.testng.TestRunner.run(TestRunner.java:621)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:357)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310)
    at org.testng.SuiteRunner.run(SuiteRunner.java:259)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1200)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1125)
    at org.testng.TestNG.run(TestNG.java:1033)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)

    ReplyDelete
  86. Hi,

    Am getting this error "Exception in thread "main" java.lang.NoClassDefFoundError: com/jacob/com/ComFailException"
    I have jacob 1.19, 64 bit system

    ReplyDelete
  87. It's very effortless to find out any matter on net as compared to books, as I found this article at this website.

    ReplyDelete
  88. Hello,

    I installed 32 bit Eclipse and JDK as well. Also, I registered ota.dll and finished with your part-1 steps. But getting same highlighted error for ALM Service wraper

    i.e. unable to to import the below:

    Please do needful.
    import atu.alm.wrapper.ALMServiceWrapper;
    import atu.alm.wrapper.enums.StatusAs;
    import atu.alm.wrapper.exceptions.ALMServiceException;

    Please suggest me, what else i need to add to resolve this..and i will be so thankful if u provide link to downlaod that...because I am nt able to downlaod service wrapper jars

    ReplyDelete
  89. I am encountering the below error

    Exception in thread "main" ALM Service Wrapper Exception Details: Unable to Establish connection for the Given URL: h

    ReplyDelete