Forum Discussion

Zuzana's avatar
Zuzana
New Contributor
9 years ago

Project xml corrupted if SoapUI not closed correctly

Hi,

 

There is a known bug when after system failure, SoapUI corrupts already saved project xml.

https://community.smartbear.com/t5/SoapUI-Open-Source/Error-Running-Soapui/m-p/7046#M4025

 

I encountered this problem twice.

As a lesson from the first experience (when just several characters have been broken and I was able to fix it), I have set automatic creation of backup folder in Preferences / UI settings and also synced the backup folder with cloud repository.

As a result of the second failure, I have THREE sets of corrupted files (this time full of NULLs and not recoverable): the actual project files, the automatic backups and even the cloud backups.

 

My recommendation to users:

- Create regular snapshots (win backup), or regularly SAVE the Project AS different file. Projects which are not opened, cannot be broken with this bug.

- Uncheck Preferences / UI settings / "Save all projects on exit".

Unfortunately, I have no solution for already broken files. I appreciate any advice here.

 

Brainstormig about possible solutions... Im not familiar with java development so may be totally out of box :-)

- Change the backup logic to create new file each time, instead of overwriting the original one. There can be, for example, three latest versions of project xml as a result of automatic backup; further backup will remove the oldest version and add a newest one.

- Or, change the logic SoapUI handles the project in memory. Does it create a "local copy" or manipulates the actual file "directly"? If not closed correctly, do not try to save latest changes (let the project file untouched)?

- Saving process handled as a kind of a transaction? Validate a file before try to save it on file system?

 

Situations when this bug can be encountered with high probability:

- Windows cannot be resumed from Sleep or Hibernate mode and hard restart or switch-off is needed.

- Computer off because of power outage.

 

 

Unexpected system failure can break new/not saved data (and no one complains) but it should never break old, saved and backup-ed ones, imho.

I would be great if SoapUI could prevent this rare, however critical issue.

 

Thank you and have a nice day,

Zuzana

 

  • nmrao's avatar
    nmrao
    Champion Level 2
    Thats why there are Content Management Systems / VCS / Subversion / Git / CVS etc. Better to have the under revision control.
    • Zuzana's avatar
      Zuzana
      New Contributor

      Yes, this statement is true and I know it very well.

       

      But such decision is made on different level.

      If your project implemented such solution also for tests (not only for code), you are lucky man.

       

      Regards,

      Zuzana

      • nmrao's avatar
        nmrao
        Champion Level 2

        I got what you mean, that is true.


        But, you can still use git for your own purpose on your machine, without server or bigger infrastructure or someone to decide. And religious follow check-in at the end of the day (if applicable, or whenever you make changes). This way, things are under your control.

         

        By the way, you can alway bring this to your team and educate them testing or automation is also serious business and needs the artifacts to be go under version control and also make them to understand the value if you lose the work and efforts required to bring it back.