Forum Discussion
- nmraoChampion Level 3
What do you mean by "convert that into ready api XML File"?
Is that readyapi project to be created automatically and import the yaml file? or just an update?
- sentrt86Occasional Contributor
We need to create the readyapi project automatically with the input as yaml file, Currently we do it manually on the app, instead of that is there any script available to create the ready api project based on the input yaml file, our ultimate goal is to create this through azure ADO pipeline, Create the ready api file project and run the ready api file and deploy it to other env.
- nmraoChampion Level 3
While it is possible to generate the readyapi project automatically, that isn't just enough i.e., the test cases are required, right?
- sentrt86Occasional Contributor
Thats correct. test case is going to be Unit testing from APIM standpoint? can you please give me some leads how to create the readyapi project automatically.
- nmraoChampion Level 3
I mean how are you going to use that project without test cases?
Regarding the project creation, should be able to find some sample online or use Javadoc for referring to API
- sentrt86Occasional Contributor
Its simple happy path test case. we run the functional test to make sure APIM api unit testing works good until set-backend url policy. we are not going to do more test scenarios only one uri path mapping to APIM code. thats it
- nmraoChampion Level 3
Where is the functional test defined and how it is going to be exeucted - this part i didn't understand.
What do you mean "to make sure APIM api unit testing works good"?
- nmraoChampion Level 3
You can try below sample java to generate the soap ui project. follow the comments inline.
import com.eviware.soapui.impl.WsdlProject; import com.eviware.soapui.impl.wsdl.support.wsdl.WsdlImporter; public class SoapUIProjectCreator { public static void main(String[] args) { // Specify the path to your SoapUI project file String projectFilePath = "/path/to/your/project.xml"; // Specify the path to your YAML file String yamlFilePath = "/path/to/your/file.yaml"; // Create a new SoapUI project WsdlProject project = new WsdlProject(); try { // Import the YAML file WsdlImporter.importWsdl(project, yamlFilePath); // Save the project to a file project.saveAs(projectFilePath); System.out.println("Project created and YAML file imported successfully!"); } catch (Exception e) { e.printStackTrace(); } } }
- sentrt86Occasional Contributor
Thank you for your response. I am trying this option achieve through CLI. Basically from Azure pipeline. is there something we can do through script?
- nmraoChampion Level 3
Sure. You need to compile the java and create a jar file.
Then you can invoke thru java command using that jar file.
Please refer
Related Content
- 9 years ago
Recent Discussions
- 5 hours ago
- 17 days ago