Forum Discussion

StankoMilosev's avatar
StankoMilosev
New Contributor
1 hour ago
Solved

Export to HTML with a long path name

Hello,

I have test with many child tests like this:

 

test/
├── childtest/
         ├── childtest1/
                  ├── childtest1a/
                           ├── childtest1a-i/
                                    ├── childtest1a-i-1/
                                             ├── childtest1a-i-1-a/
                                                      ├── childtest1a-i-1-a-x/
                                                               └── childtest1a-i-1-a-x-final

 

and so on. 


Now I have a problem when I start the tests with SessionCreator using ExportLog parameter, exception "Path too long" will be raised.

 

I already tried enabling long path support in Windows 11, but that did not solve the problem.

 

Has anyone else experienced a similar issue? Is there a solution that would allow me to keep my current test structure without changing the tests?



TIA,
Stanko

  • rraghvani's avatar
    rraghvani
    1 hour ago

    I've never come across this issue before, nor have I seen anyone else mention it on the forum.

    Your folder structure, while valid, is outdated and overkill for human use. It's too deeply nested and overly verbose, which creates several issues:

    • Hard to navigate: Drilling down 8+ levels just to reach something is inefficient.
    • Fragile paths: Long paths are tedious to type, easy to break, and can hit system limits.
    • Low readability: Names like childtest1a-i-1-a-x-final don't convey meaning - they just encode hierarchy.
    • Maintenance pain: Refactoring or moving things later becomes cumbersome.

     

    Aim for a better folder structure with:

    • A shallow hierarchy (ideally 3 - 5 levels max)
    • Meaningful names (based on purpose, not position)
    • Logical grouping (by feature, type, or domain)

5 Replies

  • The names I used here are just examples; they are not from a real case. From my point of view, the structure follows small logical steps, and it is easier to move and maintain compared to grouping everything into one large test.

     

    I am still learning the best way to write tests, and now I see that this approach may not work well in TestComplete. I just wanted to be sure.

     

    Thank you for your help.

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      Don't overcomplicate things early on, especially while you're still learning. Start simple, then improve based on feedback and experience - this a very practical and widely accepted approach.

      My result folder structure looks like this,

      Folders are created based on timestamp, of when the projects were executed.Folder contents include the resultsResults

      Once the automation completes, I get a summary email and a link to the folder containing the results.

      This was created after I had my automation fully working. 

  • rraghvani's avatar
    rraghvani
    Icon for Champion Level 3 rankChampion Level 3

    That's a limitation with your operating system, and not TestComplete.

    Why is your directory structure long?

    StankoMilosev wrote:

    test/
    ├── childtest/
             ├── childtest1/
                      ├── childtest1a/
                               ├── childtest1a-i/
                                        ├── childtest1a-i-1/
                                                 ├── childtest1a-i-1-a/
                                                          ├── childtest1a-i-1-a-x/
                                                                   └── childtest1a-i-1-a-x-final

     

  • I created this structure because I was not aware that it would cause a problem with ExportLog.

     

    What I do not understand is that TestComplete can handle such a structure and create its own logs structured in the same way, but when I try to export them, I receive an error message.

     

    So, basically, is there no solution to this problem? In other words, should I avoid using a structure that could cause problems when I try to export?

    • rraghvani's avatar
      rraghvani
      Icon for Champion Level 3 rankChampion Level 3

      I've never come across this issue before, nor have I seen anyone else mention it on the forum.

      Your folder structure, while valid, is outdated and overkill for human use. It's too deeply nested and overly verbose, which creates several issues:

      • Hard to navigate: Drilling down 8+ levels just to reach something is inefficient.
      • Fragile paths: Long paths are tedious to type, easy to break, and can hit system limits.
      • Low readability: Names like childtest1a-i-1-a-x-final don't convey meaning - they just encode hierarchy.
      • Maintenance pain: Refactoring or moving things later becomes cumbersome.

       

      Aim for a better folder structure with:

      • A shallow hierarchy (ideally 3 - 5 levels max)
      • Meaningful names (based on purpose, not position)
      • Logical grouping (by feature, type, or domain)