Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

The "path" argument must be of type string. Received an instance of Array ( ERROR if src is array for files form-data) #130

Closed
Barolina opened this issue Sep 24, 2021 · 1 comment

Comments

@Barolina
Copy link

Barolina commented Sep 24, 2021

I run

postman-to-k6 tr.json -o k6.js -e tr_env.json

than get this result )

The "path" argument must be of type string. Received an instance of Array

I don't now, why?))

My collection is example

										}
									],
							"request": {
								"method": "POST",
								"header": [
									{
											"key": "Content-Type",
												"value": "multipart/mixed",
												"type": "text",
												"disabled": true
									}
								],
								"body": {
										"mode": "formdata",
											"formdata": [
												{
													"key": "files[]",
													"description": "Массив файлов",
													"type": "file",
													"src": [
														"1.txt",
														"2.txt"
													]
												},
												{
													"key": "data",
													"value": "{\n\t\"name\": \"{{name}}\",\n\t\"num\": \"{{num}}\",\n\t\"reg_date\": \"{{reg_date}}\",\n\t\"source_id\": \"{{source_id}}\",\n\t\t\t\t\t\t\t\t\t \n\t\"attr\": [{\n\t\t\t\t  \n\t\t\t\"attr_id\": {{attr1_id}},\n\t\t\t\"attr_value\": {{rand_num}}\n\t\t},\n\t\t{\n\t\t\t\t  \n\t\t\t\"attr_id\": {{attr2_id}},\n\t\t\t\"attr_value\": \"{{rand_str}}\"\n\t\t},\n\t\t{\n\t\t\t\t  \n\t\t\t\"attr_id\": {{attr3_id}},\n\t\t\t\"attr_value\": \"{{rand_date}}\"\n\t\t},\n\t\t{\n\t\t\t\t  \n\t\t\t\"attr_id\": {{attr4_id}},\n\t\t\t\"attr_value\": {{rand_bool}}\n\t\t},\n\t\t{\n\t\t\t\t \n\t\t\t\"attr_id\": {{attr5_id}}\n\t\t}\n\t],\n\t\"files\": [{\n\t\t\"file\": \"1.txt\",\n\t\t\"fr_id\": {{fr_id1}},\n\t\t\"parent_file\": null\n\t}, {\n\t\t\"file\": \"2.txt\",\n\t\t\"fr_id\": {{fr_id2}},\n\t\t\"parent_file\": \"1.txt\"\n\t}]\n}",
													"contentType": "application/json",
													"description": "JSON",
													"type": "text"
												}
											]
						
								},
								"url": {
									"raw": "https://trarchive.it-thematic.ru/api/ead/eds/",

But i use to POST form-date like multi-form (multipart/mixed) and body like 'raw', maybe this problem?)

yes, he is doesn't path to file

	"1.txt",
	"2.txt"
]```
@Barolina Barolina changed the title postman-to-k6 tr.json -o k5.js -e tr_env.json The "path" argument must be of type string. Received an instance of Array Sep 24, 2021
@Barolina Barolina changed the title The "path" argument must be of type string. Received an instance of Array The "path" argument must be of type string. Received an instance of Array ( ERROR if src is array for files form-data) Sep 24, 2021
@ppcano
Copy link
Collaborator

ppcano commented Nov 22, 2021

Apologies for the inactivity on this project.

Due to the inability to properly support this project, the k6 team has decided not to continue its development. The primary reason is that k6 scope has grown significantly with the launch of k6 extensions. The team is prioritizing extending k6 capabilities over the converters.

We suggest you post your issue at api-deck/postman-to-k6. The project is active and maintained on this fork.

@ppcano ppcano closed this as completed Nov 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants