1
0
-1

We would like to use Exalate to sync XRAY Test Sets and Tests between to distinct Jira instances that are connected via VPN via a scripted connection.


Status now is:

-We cannot Sync Test Sets. I assumed they are treated as Epics and since the external script for EPIC Synced is deployed we added the Send/Receive EPIC function to the OUT/IN - Coming Scripts. but this didn't work. Currently exalating a test set does nothing. No Change

-We can sync Tests. Here it only syncs the standard fields but we also require it to synchronize the Manual Test Steps. 

         -I have tried adding the Manual Test Steps as Custom Field via the Field ID but it syncs something like this                 which the remote side does nothing with

                -com.exalate.basic.domain.hubobject.v1.Basic Hub Custom Field XXXX

Has anyone got some experience with this or ideas I am at a loss (smile) 


Cheers

Max

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hello, Maximillian Thomas Nadolny 
      I've got a solution for Test Set to Test association sync.


      On Jira A, OUT:

      replica."Tests" = issue."Tests association with a Test Set"
      replica."Test Sets" = issue."Test Sets association with a Test"

      On Jira B, IN:

      def getLocalIssueKeyByRemoteUrn = { urn ->
          nodeHelper
              .twinTraceRepository
              .getTwinTraceByRelationAndRemoteIssueUrn(connection, urn, "issue")
              ?.localReplica
              ?.issueKey
      }
      def getLocalIssueUrnByRemote = { urn -> 
          getLocalIssueKeyByRemoteUrn(urn)?.URN 
      }
      def mergeLists = { List<String> _l, List<String> _r ->
          def l = _l ?: []
          def r = _r ?: []
          Set<String> mergedSet  = [] as Set<String>;
          mergedSet.addAll(l)
          mergedSet.addAll(r)
          mergedSet as List<String>;
      }
      if (replica.project.key == "XRAY") {
          // XRAY -> XRAY2 sync
          if (replica."Tests" && !replica."Tests".empty) {
              def local = replica."Tests"
                  .collect(getLocalIssueUrnByRemote)
                  .findAll()
              issue."Tests association with a Test Set" = mergeLists(issue."Tests association with a Test Set", local)
          }
          if (replica."Test Sets" && !replica."Test Sets".empty) {
              def local = replica."Test Sets"
                  .collect(getLocalIssueUrnByRemote)
                  .findAll()
              issue."Test Sets association with a Test" = mergeLists(issue."Test Sets association with a Test", local)
          }
      }

      Here's a video, showing how this works:

      Regards, Serhiy.

      1. Serhiy Onyshchenko

        Unfortunately, in order to sync test steps, one needs to store steps into XRAY DB, and then it should go smooth from there on.
        I'm currently looking into options on either using XRAY public REST API or using direct SQL to insert the records.

      CommentAdd your comment...