3 Replies Latest reply on Mar 1, 2019 3:32 AM by John Messinger

    Automation test for AF SDK application

    Noga

      I wrote an application that uses AF SDK to synchronize two different PI-AF servers, by exporting any change made to the source server and importing the change's xml to the destination PI-AF server.

      Now I wish to test my application to verify that all possible change is transferred and imported correctly to the dest PI-AF server.

       

      Since the number options and combinations of changes possible to be made to the source server is immense,

      I wish to know- Is there an automated application test I can use for testing my application? or is there any documented guidelines for writing such a test?

      I wish to cover as many options as possible, and I fear that making changes manually to the source server will result in missing some of the options on my test.

        • Re: Automation test for AF SDK application
          sraposo

          Hi Noga,

           

          I'm not aware of any guidelines or automated applications to test your AF SDK sync application.

           

          Which AF SDK method are you using? Is it PISystem.FindChangedItems : PISystem.FindChangedItems Method (Boolean, Boolean, Int32, Object, Object) (or one of the overloads)  ?

           

          Thanks,

          Seb

          • Re: Automation test for AF SDK application
            John Messinger

            When I hear automated testing I think unit testing or CI testing. What you are looking for doesn't appear to fit either one of those types of tests. I'm not aware of of any automated test tools or frameworks that will validate the end result of your application like this, specifically that your AF systems are in sync after your code has run.

             

            From a manual perspective, taking an XML export of each database on the source and destination systems and then differencing them with a tool like WinMerge or WinDiff would allow you to reasonably quickly identify any significant differences.

             

            Alternatively, you could write your own testing tool to do this for you. You could do a string compare of the xml from each systems version of the same database for example. Or write some form of custom comparer to compare at an object level.

             

            If you haven't already done so, I would consider writing some appropriate unit tests to ensure that the key functions in your code do what you expect. I've found that there are some considerations to take into account when writing unit tests for AF SDK based applications (and I'm slowly drafting a blog post on this topic), but this is still a good place to start.

             

            Add some verbose debug level logging to your application to see what is happening during execution - maybe perform some object level comparisons during a debug execution and log those as a means of being satisfied that things are working as expected or highlighting where they're not.

             

            These are just some initial thoughts, and maybe you've already found a good solution in the time since you first posted your question. But I think there are multiple options available to you here.

            2 of 2 people found this helpful