cancel
Showing results for 
Search instead for 
Did you mean: 

Export project without any properties data

Highlighted
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
Highlighted
Super Contributor

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

Highlighted
New Contributor

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.

Highlighted
Community Hero

@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.
Highlighted
Occasional Contributor

@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) 

Highlighted
Community Hero

Thank you for clarifying.

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


Regards,
Rao.
Highlighted
Occasional Contributor

@nmrao I meant test step

Highlighted
Community Hero

@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.
Highlighted
Occasional Contributor

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

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get a full Raw JMS request

Participate!

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors