Test Data Manager

Expand all | Collapse all

Howto call a TDM Generator and get it´s data with TDM API

Jump to Best Answer
  • 1.  Howto call a TDM Generator and get it´s data with TDM API

    Posted 04-30-2020 11:11 AM
    Hello! I´m new at this forum, so may be my question does not make sense and it´s just a question ob looking at the good url.
    My doubt is: I need to make a call to a TDM generator, as we do when using Self Service Generator, but this time I need to provide testers with the capability of an API call (getting the bearer token, etc) so the can generate their own data after I´ve generated their generator. As they want to do this from their own sw, they asked me to buid this java button fior them.

    So please, could anybody help this novice?
    Thanks in advance

    ------------------------------
    Fran Espuig
    ------------------------------


  • 2.  RE: Howto call a TDM Generator and get it´s data with TDM API
    Best Answer

    Posted 05-01-2020 05:43 AM
      |   view attached
    You can use TDMJobService API to submit a new Publish job as it is done from Generator.

    https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/continuous-testing/test-data-management/4-9/reference/rest-api-reference/api-services-reference/tdmjobservice.html

    To use that Job API call for the first time, you will have to get the right JSON request payload captured from the browser publish once and then you can use it in the API calls subsequently.

    PFA the document(TDMPublishJobAPICall.docx) that explains how you can capture required details from browser and them use them in API call.

    Same process can be followed to get the correct request format for other API calls.

    We also have a variety of calls making changes to the Generator using TDMGeneratorService.

    - https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/continuous-testing/test-data-management/4-9/reference/rest-api-reference/api-services-reference/tdmgeneratorservice.html

    Attachment(s)

    docx
    TDMPublishJobAPICall.docx   8.27MB 1 version


  • 3.  RE: Howto call a TDM Generator and get it´s data with TDM API

    Posted 05-04-2020 05:36 AM
    Edited by Francisco Espuig 05-04-2020 06:33 AM


  • 4.  RE: Howto call a TDM Generator and get it´s data with TDM API

    Posted 05-04-2020 10:05 AM
    Hi,

        I have created some sample powershell scripts that you might find useful.  They can be downloaded from this GitHub location -  Field Developed Scripts  .

         The TDM generator powershell script is called TDMAPIGeneratorExample.ps1 and  also requires a payload file called GenBody.json.


    ------------------------------
    Regards

    Keith Puzey
    Client Services Consultant | Enterprise Software Division
    Broadcom
    ------------------------------



  • 5.  RE: Howto call a TDM Generator and get it´s data with TDM API

    Posted 05-05-2020 06:08 AM


    These are the steps to use this powershell script.

     

    • Download the json file json and update the following sections with details for the generator to be called:

                                     Name

                                     Description

                                     ProjectID

                                     VersionID

                                     generatorID

                                                    tableNo

                                                    tableName

                                     dataTargetProfile

                                     dataSourceProfile

    • Download the script file ps1
    • Call the script using the following parameters:
      1. url =             TDM Server URL
      2. username Portal user name
      3. password Portal user password
      4. ProjectName Portal Project Name
      5. Version Portal Project Version

    Example

    powershell -file TDMAPIGeneratorExample.ps1 -username administrator -password marmite -url http://TDMServername:8080 -ProjectName "Web Store Application" -Version 22 -jsonfile GenBody.json

     

    Note: I created a second script that can be used to easily return the ID's for Projects / Versions / Environments / Generators etc.  This is the link to the script TDMAPIExample.ps1

       This is a sample of the output showing the ID's specified in the CLI





    ------------------------------
    Regards

    Keith Puzey
    Client Services Consultant | Enterprise Software Division
    Broadcom
    ------------------------------



  • 6.  RE: Howto call a TDM Generator and get it´s data with TDM API

    Posted 05-05-2020 01:06 PM
      |   view attached
    If you are new to APIs and are uncertain after reading the information above, I've taken Keith's excellent contribution and bundled it with a RunBook example that you can use to familiarize yourself with the complete end-to-end process.  The package is attached.

    Attachment(s)

    zip
    TDMAPIDataGenExample.zip   2.66MB 1 version