Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

[API] custom_steps_separated does not update


#1

Hi,
I am trying to add test case from Python using the following code.

title='Test case from CSV - 5' typeID = 2 priority=2 estimate=20 case = client.send_post('add_case/2', {'title':title, 'type_id':typeID, 'priority_id':priority, 'estimate':estimate, 'mileston_id':1, 'refs':'Excel', "custom_preconds": "These are the preconditions for a test case", 'custom_steps_separated':[{'content': "Step 1",'expected': "Expected Result 1"},{'content': "Step 2",'expected': "Expected Result 2"}]})

However, when I execute this, it creates a new test case and adds all the details [color=red]except [/color]the custom_steps_separated.
I have the custom_steps_separated enabled in adminsitration and I am already able to create custom_steps_separated manually or even doing a CSV upload.

Can anyone please point me if I am doing anything wrong here?

Thanks,
Gopal


#2

Oops… It was a spelling mistake. custom_steps_sep[color=red]a[/color]rated should have been custom_steps_sep[color=red]e[/color]rated


#3

Thanks for your posting, Gopal, and great to see that you’ve got it working already! It’s important to use the exact same system name (including custom_ prefix) to submit custom fields via the API as displayed under Administration > Customizations.

Regards,
Tobias