cancel
Showing results for 
Search instead for 
Did you mean: 

TestCase Soap with Content PDF File

SOLVED
Highlighted
Occasional Contributor

TestCase Soap with Content PDF File

Hi, i have been build a testcase that works god with the same Contentfile each. For now i would send up a different file to the Soap Service. Its have the same name like in my datasource. 

Example: id=123456789 File=123456789.pdf

Any idea ?

Thanks,

Stefan

Anmerkung 2020-04-01 153100.jpgAnmerkung 2020-04-01 153136.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: TestCase Soap with Content PDF File

@stefankranz 

Please check the screen shot.

Define the directory(where the file are available in the system) at suite level (You can use test case level as well, but my sample defines at suite level so that the same can be used in other test cases) with property DIRECTORY; and define FILE property at test case level.

Now, once you read the value from data source, assign that value to FILE property

 

By now, the FILE will have different value each time as you are modifying before Request step.

 

Use appropriate content type. Just focus on directory and file names, I would say.

Please refer documentation
https://www.soapui.org/scripting-properties/working-with-properties.html
https://www.soapui.org/scripting-properties/property-expansion.html



Regards,
Rao.

View solution in original post

8 REPLIES 8
Highlighted
Community Hero

Re: TestCase Soap with Content PDF File

Use custom property for the file name such as ${#TestCase#FILENAME} instead of specific file name in the attachment section, before that save the file name in custom property.


Regards,
Rao.
Highlighted
Occasional Contributor

Re: TestCase Soap with Content PDF File

Thanks, i dont understand it ? Do you know a Example for this ?

How i can set the relation between Filename / Filepath and Name in a Excel Sheet ?

Highlighted
Community Manager

Re: TestCase Soap with Content PDF File

Thank you for the advice Rao!

 

@stefankranz please let us know if you managed to implement the suggestion, or still looking for guidance?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: TestCase Soap with Content PDF File

Sonya,

 

no i dont have a solution. I dont understand how i can match my fieldcontent like 123 and my files 123.pdf.

How it works ?

 

Thanks,

Stefan

Highlighted
Community Manager

Re: TestCase Soap with Content PDF File

Thanks for the update. Let's see if the Commuity can help guide you through this. 

@HimanshuTayal @richie @nmrao @msiadak , can you help?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: TestCase Soap with Content PDF File

I dont have finished that. Do you have an example ?


@sonya_m wrote:

Thank you for the advice Rao!

 

@stefankranz please let us know if you managed to implement the suggestion, or still looking for guidance?


 

Highlighted
Community Hero

Re: TestCase Soap with Content PDF File

@stefankranz 

Please check the screen shot.

Define the directory(where the file are available in the system) at suite level (You can use test case level as well, but my sample defines at suite level so that the same can be used in other test cases) with property DIRECTORY; and define FILE property at test case level.

Now, once you read the value from data source, assign that value to FILE property

 

By now, the FILE will have different value each time as you are modifying before Request step.

 

Use appropriate content type. Just focus on directory and file names, I would say.

Please refer documentation
https://www.soapui.org/scripting-properties/working-with-properties.html
https://www.soapui.org/scripting-properties/property-expansion.html



Regards,
Rao.

View solution in original post

Highlighted
Community Manager

Re: TestCase Soap with Content PDF File

Thanks a lot  Rao for explaining this!

 

@stefankranz were you able to achieve what you intended? Please shareSmiley Happy


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors