Complex project creates many unnecessary tmp files

Report your bugs here. We promise to deal with them.

Complex project creates many unnecessary tmp files

Postby Yoav Seroussi » 23 Jun 2010 10:05

Hi,

I'm running SoapUI Pro 3.5.1 (build: daily-2010-04-18-[1], but it also happens for the distro build).
The OS is Windows Vista Business SP. 2 64bit.
I think the JRE is the on installed from the exe (JRE 6u18).

The problem we have (not only on my computer) is that the soapUI Pro creates hundreds of tmp xml files in the composite project.

Here's a screenshot to illustrate the problem:
Image

Regards,
Mike
Yoav Seroussi
soapui pro users
soapui pro users
 
Posts: 17
Joined: 15 Mar 2010 12:33

Re: Complex project creates many unnecessary tmp files

Postby SmartBear Support » 23 Jun 2010 13:34

Hello,

Can you check logs do you have any errors reported. Those files should be removed. Could you try with nightly build?

robert
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: Complex project creates many unnecessary tmp files

Postby enliven » 13 Sep 2010 23:54

I also have this issue (3.5.1 Build dist-97-2010-04-12, Build Date 2010/04/12 09:51)...
I would suggest that SoapUI not open/import those files *if* it finds them (due to not being removed from previous shutdown/exit-error)
Also, it would be even better if SoapUI set these files to hidden which would make managing source control much easier (or even better would be to put them into a completely separate temp directory i.e. c:\temp\soapui...)
enliven
soapui pro users
soapui pro users
 
Posts: 32
Joined: 28 Aug 2008 20:37

Re: Complex project creates many unnecessary tmp files

Postby SmartBear Support » 15 Sep 2010 15:16

Hi,

Unfortunately we haven't managed to reproduce this. Is there any error in the log due to which they might have not been deleted.
Any instructions on how we could try to reproduce?

Regards
Dragica
/eviware.com
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: Complex project creates many unnecessary tmp files

Postby enliven » 16 Sep 2010 00:31

I get this every time I "save all projects in workspace" OR right click 'save' individual projects (tmp files created & errors only for specific project being saved).

What else might help you solve this?
Attachments
ErrorLog.txt
(48 KiB) Downloaded 887 times
SoapUIlog.txt
(45.21 KiB) Downloaded 828 times
enliven
soapui pro users
soapui pro users
 
Posts: 32
Joined: 28 Aug 2008 20:37

Re: Complex project creates many unnecessary tmp files

Postby SmartBear Support » 17 Sep 2010 13:51

Hello,

Since soapUI is used on different platforms, we are trying when saving files to be saved to be compatible with file system project is saving. We'll see that this will be fixed.

robert
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: Complex project creates many unnecessary tmp files

Postby enliven » 13 Oct 2010 17:37

Any progress made on this issue? its extremely annoying...
soapui-tmpFilesBug.png
soapui-tmpFilesBug.png (29.37 KiB) Viewed 5969 times
enliven
soapui pro users
soapui pro users
 
Posts: 32
Joined: 28 Aug 2008 20:37

Re: Complex project creates many unnecessary tmp files

Postby enliven » 03 Nov 2010 21:55

What is the status of correcting this issue???
Its causing us a lot of pain...
enliven
soapui pro users
soapui pro users
 
Posts: 32
Joined: 28 Aug 2008 20:37

Re: Complex project creates many unnecessary tmp files

Postby steffen » 23 Jan 2012 11:25

Hello,

i have the same issue. It is very hard to work with soapUI because you have always to delete all tmp-files in your project dir before you should start soapui otherwise you get copies of test-steps for each tmp-file.

Further information:

  • I get the following warning in error-log for each tmp-file:
    Mon Jan 23 10:57:07 CET 2012:WARN:Failed to delete temporary file: D:\TestStep-tmp4955616171244031602.xml
  • Version control system SVN is used
  • The issue can be reproduced on different systems

I hope this issue will be fixed soon.
steffen
User
 
Posts: 8
Joined: 25 Oct 2011 15:59

Re: Complex project creates many unnecessary tmp files

Postby steffen » 23 Jan 2012 11:34

I have googled your source-code and find the following:

source: http://www.soapui.org/xref/com/eviware/ ... oject.html

Code: Select all
   private static void normalizeLineBreak( File target, File tmpFile )
   {
      try
      {
         FileReader fr = new FileReader( tmpFile );
         BufferedReader in = new BufferedReader( fr );
         FileWriter fw = new FileWriter( target );
         BufferedWriter out = new BufferedWriter( fw );
         String line = "";
         while( ( line = in.readLine() ) != null )
         {
            out.write( line );
            out.newLine();
            out.flush();
         }
         out.close();
         fw.close();
         in.close();
         fr.close();
      }
      catch( FileNotFoundException e )
      {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
      catch( IOException e )
      {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }

      if( !tmpFile.delete() )
      {
         SoapUI.getErrorLog().warn( "Failed to delete temporary file: " + tmpFile.getAbsolutePath() );
         tmpFile.deleteOnExit();
      }
   }


The close-calls sould be moved into a finally-block because if there are any exceptions before the files will be never closed. However, i don't know whether this change could fix the described issue.
You can see also that exception-handling is missing.
steffen
User
 
Posts: 8
Joined: 25 Oct 2011 15:59

Re: Complex project creates many unnecessary tmp files

Postby steffen » 24 Jan 2012 08:53

Hello,
the normalizeLineBreak-method which is called in composite-mode seems to be the cause. This is part of the soapUI-Pro-Project so i am not able to review the source.

If i disable the normalizeBreak-setting the problem does not exist anymore.

I would appreciate it if you check the above-mentioned case in your source-code and fix it.
steffen
User
 
Posts: 8
Joined: 25 Oct 2011 15:59

Re: Complex project creates many unnecessary tmp files

Postby SmartBear Support » 27 Jan 2012 16:07

Hello,

thank you! I've just opened issue SOAPUI-3308 for dealing with this.

Regards,
Vladimir
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: Complex project creates many unnecessary tmp files

Postby enliven » 27 Jan 2012 18:38

Good work Steffen!
enliven
soapui pro users
soapui pro users
 
Posts: 32
Joined: 28 Aug 2008 20:37

Re: Complex project creates many unnecessary tmp files

Postby SmartBear Support » 01 Feb 2012 23:21

awesome work indeed!

I've attempted a fix to this - will be in the upcoming nightly build - please give it a try and let us know if it makes any difference.

Thanks!

/Ole
SmartBear Software
SmartBear Support
Administrator
Administrator
 
Posts: 6702
Joined: 16 Feb 2009 10:53

Re: Complex project creates many unnecessary tmp files

Postby steffen » 03 May 2012 08:37

Hello,
sorry that i reply so late.

Is this fix taken to the newest version of soapUI 4.5 (release or nightly build)?
steffen
User
 
Posts: 8
Joined: 25 Oct 2011 15:59

Next

Return to soapUI Pro Bugs