cancel
Showing results for 
Search instead for 
Did you mean: 

Export project without any properties data

rutwij89
Occasional Contributor

Export project without any properties data

Hello all,

 

I have to give the API project manifest to a client without any internal passwords and such stored in the properties. Is there a way to export a project without any data from properties

 

 

Tags (2)
8 REPLIES 8
avidCoder
Super Contributor

Re: Export project without any properties data

Could you please elaborate little bit more? What exactly you want to achieve here?

depstein
New Contributor

Re: Export project without any properties data

I solved this problem by writing a Groovy script (in a fake test suite/test case) that parses the project XML file, removes/replaces nodes with sensitive data, such as authentication profiles and properties with user names and passwords, and saves a copy of the file.

 

Sorry, can't post the code, but each step in the above process has a straightforward solution that can be looked up/googled.

nmrao
Community Hero

Re: Export project without any properties data

@rutwij89, do want to remove property names too along with values? or just remove the property values?

By the way, what level the properties to be cleanedup? Project level? Please clarify.


Regards,
Rao.
rutwij89
Occasional Contributor

Re: Export project without any properties data

@nmrao Thanks for your reply. I want to remove just the property values and I want to remove them all levels (project, testsuite, testcase, call) 

nmrao
Community Hero

Re: Export project without any properties data

Thank you for clarifying.

What do you mean by "call"? Calling another test case? If so, Can't use property expansion there?


Regards,
Rao.
rutwij89
Occasional Contributor

Re: Export project without any properties data

@nmrao I meant test step

nmrao
Community Hero

Re: Export project without any properties data

@rutwij89,

 

Thank you for your question. Felt somehow the question is interesting.

 

Here is what it is:

 

  1. It is script, and best fit is to use it in Save Script at Project level. That means, the code is natural fit here as you want to save the project before giving to whom so ever by clearing the property values. So, copy the provided script into Save Script at Project level. As name says all, the script gets executed automatically when the project is saved.
  2. The next question would be "I am working on this project and wish this script to be run on demand only, not just on saving the project".
    • Don't have to worry if you just run the script based on some condition.
    • Say, define Project level property CLEAR_PROPERTIES and set its value as false while you are working on the project. It won't clear your data though the project is saved any number of times.
    • Once the project is ready and you want to provide it to different parties and that's when you need to clear those data. Now, just change the CLEAR_PROPERTIES value to true. And save the project. And see the magic!!

Here is the script:

https://github.com/nmrao/soapUIGroovyScripts/blob/d1bbad9684907195f2cd70ec60e417c414814a41/groovy/Cl...

 

 



Regards,
Rao.
rutwij89
Occasional Contributor

Re: Export project without any properties data

@mnrao Thanks a lot. I will give it a try and let you know

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors