Forum Discussion

PingS's avatar
PingS
Occasional Contributor
8 years ago
Solved

Imported Keyword test does not work

I am developing some autotest for a web site. All the tests will start from login page and login with user name and password. I planed to have to projects in the project suite: Project A to Project B. In Project A, I recorded a keyword test i to perform the login actions. In Project B, I imported the LoginTest of Project A. Then I created a keyword test (DashBoardTest) in Project B. The first step of the DashBoardTest is to run LoginTest.

 

I run the LoginTest in Project A, it works fine.

 

I run the DashBoard test in Project B, it launched the LoginPage but it can not find the Username input box and then it stops working.

 

This is a simple test to test the importing keyword test from one project to another. But it seems not working well.

What have I missed? I also notice, there is no "Reload" right click menu context. I am using Test Complete 12. How do I refresh the imported test?

  • Hi David!  There are two aspects for GitHub push.

     

    1) Pushing your definitions upon save.  That's what it sounds like you have configured, and based on the filename, SwaggerHub will push either a JSON or YAML version directly to github.  Check your repository to verify that.

     

    2) Linking a GitHub repo to your account.  This is slightly different from above, it essentially hot-links the GitHub logo from your APIs page to the repo.  To configure that, click the "+" => Edit API Info => GitHub Link.  Then it will hot-link directly to your repo.

     

    I will get this added to the FAQ as well, please reply with any other questions!

  • Hi, we have addressed the push issue.  If your output file has the suffix ".json", it'll be saved as JSON.  Otherwise, YAML.

     

    Please let us know how it goes!

7 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    The keyword test is probably referencing name mapped objects.  So, you may have copied the keyword test to the new project but it is dependant upon the NameMapping scheme as well.  Try sharing the name mapping between projects as well.

    • PingS's avatar
      PingS
      Occasional Contributor

      I am new to Test Complete. How do I share the Name mapping? 

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        One of two ways:

        1) Right click on the project and select "Add -> Existing Item" and navigate to the NameMapping.tcNM from Project A and add it to Project B.  The benefit of doing it this way is that, anytime you update object identification in either project, it will immediately update it in the other project.  Requires Project B to not have a pre-existing NameMapping node... can be removed/deleted from the project if you desire to go this route.

         

        2) Right click on the NameMapping node of Project B and select "Merge" then navigate to the NameMapping file from Project A and complete the merge.  The benefit of doing it this way is that you can isolate the NameMapping for the two projects so that changes in one don't affect the other.

         

        On a side note:

        Please find and view a TestComplete 101 webinar... you can attend one live or watch the recording of one.  Either way, this will give you the basics of TestComplete.  NameMapping is one of the core pieces of TestComplete and is the default behavior for object identification.  Everything dealing with onscreen components references NameMapping.  SO, get an understanding of NameMapping and you'll have a good portion of TestComplete known... and the webinars cover a good bit of this.