Forum Discussion

exdunepilot's avatar
exdunepilot
Contributor
8 years ago

Has Anyone Migrated Their Project to Python From Another Language...

and if so, what is the best way to do it & has it provided additional benefit (in other words, was it worth it)?  My dilemma is we have a significant number of legacy tests (300+) all done in JScript.  Its tempting to migrate to Python, but I don't want to do it just because Python is "cool."  Nor do I want two separate projects as many of the legacy scripts are reusable.  I want to know there is real benefit.  Any input would be appreciated.

4 Replies

  • I don't think it's possible to migrate from one language to another. Once a project is created around one language, that's it from there forward.

    For instance, we have one project that we coded in C# before we decided to go to JScript for everything. One of my tasks is to re-create that project from scratch, manually. Just being able to save it in another language would be cool, but technically infeasible.

    If you have 300+ projects in another language, I'm afraid your best bet is to leave them in that language. If you want to embrace Python, work every new project in Python from here forth, and assign resources to translate the past projects as available. If they have shared libraries, that would make it go even faster, but I don't think there's an easy way around this.

    • exdunepilot's avatar
      exdunepilot
      Contributor

      Thanks Kirk.  I considered a "common" project and/or Script Extensions, but in the end I agree with the strategy you outline.   For TC 12.0 I hear there is JavaScript support and that projects using JScript could be converted with a SmartBear utility.   No such thing for JScript to Python (obviously they are too different).

       

      I'm wondering if those that are using Python within the context of TestComplete are happy with it, especially if they've used other languages previously.

      • sha's avatar
        sha
        Contributor

        Hi,

         

        FYI

         

        The JScript to JavaScript 'translation' does not change the code at all: it only marks the code to be run by another interpreter. The differences between the two languages are so small that this works for most cases, and in the cases where there are differences, you are yourself responsible for changing the code.

         

        /

        Søren Harder,

        QA/test-engineer, Zmags

    • Ravik's avatar
      Ravik
      Super Contributor

       kirk_bottomley absolutely correct, it's very painful to convert/migrate project from one language to another, It is a manual task and management expect ROI same as past.  its better to start new project in python instead of migrate existing.

       

      We had deadly painful movement. :( Finally dropped that idea.