Re: Issues while uploading cases and suites using json REST api

34 views
Skip to first unread message

Cameron Dawson

unread,
Dec 6, 2013, 9:32:40 PM12/6/13
to moz...@googlegroups.com
Hi Ayush — These endpoints are still under development, and, at this time, adding cases to suites is read-only.

However, there is an older, alternative way to add bulk cases to moztrap.  Please see instructions on using this here:


I hope this helps
-Cam

On Nov 29, 2013, at 1:02 AM, Ayush Gupta <ayush...@navyuginfo.com> wrote:

Hi,

       I am new to moztrap and been trying to add cases and suites from REST api using json . 

The sample request provided in docs is not working for me .

e.g. i used following content 
URL : http://moztrap.myapp.com/api/v1/case/?username=user.name&api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Request- Type : POST
Content-Type : application/json 

        {
            "name": "sample case title",
            "product": "/api/v1/product/14/",
            "description": "case description",
            "suites": ["Suite_AA_28112013"],  
            "created_by": "user.name",
            "steps": [
                {
                    "instruction": "instruction text1",
                    "expected": "expected text1"
                },
                {
                    "instruction": "instruction text1",
                    "expected": "expected text1"
                }
            ]
        }
  
  and i got this in response :
  
{
created_by: "user.name"
description: "case description"
id: "3563"
idprefix: ""
name: "sample case title"
resource_uri: "/api/v1/case/3563/"
steps
[
2]
0:  
{
expected: "expected text"
instruction: "instruction text"
}
-
1:  
{
expected: "expected text"
instruction: "instruction text"
}
-
-
-
suites
[
0]
}

As you can see i didn't got any suite that i have added in this case .


Also on the web interface i am not seeing the cases i have added .

Please anyone provide me proper syntax to add bulk cases and suites in moztrap using json or excel .

Thanks and Regards
Ayush Gupta

--
You received this message because you are subscribed to the Google Groups "MozTrap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moztrap+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Cathy Dai

unread,
Dec 20, 2013, 5:20:22 AM12/20/13
to moz...@googlegroups.com
Hi Cam,

I need this rest api as well. Do you have any estimation of getting this implemented? 

Plus, I get different result than Ayush. I get 401 Unauthorized error when posting. Is that as expected so far? I wonder why Ayush got 200 with this api not implemented.

Thanks,
Cathy
Reply all
Reply to author
Forward
0 new messages