Forum Discussion

prichard's avatar
prichard
Occasional Contributor
8 years ago

Delphi application compiled with debug information

Hello, 

 

I'm using Testcomplete to run automated tests on a Delphi application. The application is compiled with debug information. My problem is that the behaviour of the application with debug information is slightly different from the one which has no debug information. As an example, my debug information application does not refresh a form when clicking on a grid line while the other one does.

 

Has any Testcomplete user ever meet this problem ?

 

Thank you in advance.

 

Regards.

5 Replies

  • Not an issue I've ever had?

     

    As far as I'm aware, it was simply to move the BPL library files into the individual executables. Normally, we have multiple Delphi EXE's within our application. The BPL files (kind of the Delphi equivalent of a DLL as I understand it) are normally stored externally to the EXE's and shared between them. In order for TC to pick up the native methods and properties, the BPL libraries need to be embedded in the compiled EXE.

     

    For me, this results in a slightly bigger EXE. But functionally, it behaves exactly the same. All my grids, trees, tables etc all behave the same. Included ones running off underlying datasets (fiddly!) and ones we have customised slightly, added extra event handlers to, etc etc. It's all the same.

     

    Can I check, when you say behaves differently, do you mean when you use it manually, or when you drive it through scripts?

     

    Manually, I would expect identical behaviour. But with scripts, if you invoke methods the user would not normally trigger (quite possible once you have access to all the native stuff), I could see that having the potential to cause some strange behaviour. And with some of the custom controls, I had to mimic user behaviour in very specific ways for them to behave correctly.

     

    For example: A custom treeview. We added event triggers that are activated by a click on the Tree object. Clicking the checkbox attached to a node via the usual Click/Check/Whatever method did not tigger the event. I had to find the node. Then use it's properties to get it's co-ordinates relative to the grid it lived in. Then apply the click to the grid object at the calculated co-ordinates. Otherwise the event did not trigger. Without some help from the dev team, working things like this out can be nigh on impossible!

    • prichard's avatar
      prichard
      Occasional Contributor

       

      • Colin_McCrae's avatar
        Colin_McCrae
        Community Hero

        Hmmm. Agreed. That doesn't sound right.

         

        Functional behaviour shouldn't be affected. That's not a side-effect I've ever seen with it....

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    Hi,

     

    Colleagues of mine say that an exe with debug info would not potentially behave like an exe without them.

    So if you use debug infos, you will always risk having errors in your non regression tests.

    You may have the error of missing something thats occurs or spending time in a false-positive.

    I'm scripting with TestComplete non regression tests for two big delphi apps since a few years now, and I never had the opportunity to include debug info. This is not negociable at my work, for the reasons I explained before.

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      I can only offer my experience.

       

      As I say, the debug info is exposed by the compile options (primarily, including the BPL libraries for me). So the code base is unchanged. So functionally, it should remain the same. That makes sense to me.

       

      m_essaid .... "Colleagues of mine say that an exe with debug info would not potentially behave like an exe without them."

       

      I'm curious, why do they think this? Have they explained why they think it would behave differently? I'd be interested to know so it's something I can watch for myself. (As behaviour is identical for me ...) The build engineer I worked with to set up the compile options on our Delphi project didn't see any problem with compiling it this way.

       

      Also, as I've mentioned, some of the methods required to properly interact with, and extract details from, certain controls is simply not possible with having the native methods available. The certainly applies to a lot of the grids we use. The basic published methods and properties simply aren't enough. And these controls make up a sizeable part of what goes on on most panels. Without being able to use them properly, I wouldn't be able to test much.