Forum Discussion

matthias_graehn's avatar
matthias_graehn
New Contributor
2 years ago

Import postman collection in SoapUI 5.7.0 raises an exception

Hi there,

 

if I want to import a postman collection I always get an exception:

I tried exporting collection in Format 2.0 and 2.1. Other options are not possible in Postman anymore. The plugin is present in the plugin polder.
What can I do to solve this?

Thanks and Best Regards

Matt

  • nmrao's avatar
    nmrao
    Champion Level 3

    Try to open the postman exported file and see if that is a valid json array. If that is not json array, then try to make it JSON array and then import it - based on the error you posted.

  • Yes I see why it is not working now. I structured the request within folders to have a better overwiew. It seems the items are not read and a request arry is expected instead of an item array. But also if the collection is unstructured there is an item array which consists of
    objects:

    {
    	"name": "api_key/",
    		"request": {
    			"auth": {
    				"type": "noauth"
    			},
    			"method": "POST",
    			"header": [],
    			"body": {
    				"mode": "urlencoded",
    				"urlencoded": [
    					{
    						"key": "username",
    						"value": "{{api.username}}",
    						"type": "text"
    					},
    					{
    						"key": "password",
    						"value": "{{api.password}}",
    						"type": "text"
    					},
    					{
    						"key": "platform",
    						"value": "{{platform}}",
    						"type": "text"
    					}
    				]
    			},
    			"url": "{{protocol}}://{{base_url}}/api/api_key/"
    		},
    		"response": []
    }

    Renaming the item array also does not succeed. I guess the plugin is outdated for the new structured v2.0 & v2.1 Postman-JSON.

  • nmrao's avatar
    nmrao
    Champion Level 3

    matthias_graehn 

    May be you can try wrapping the exported json between [ ...] and see.

    For example, the postedman exported json

    {
      "info": {
    
      },
      "item": [
    
      ]
    }

    Change it to as shown below, save it and try to import

    [
      {
        "info": {
    
        },
        "item": [
    
        ]
      }
    ]