I tried to import my test cases using Zephyr Test case importer but it display 401 error for some reason

saigiriraj saggu June 24, 2015

Hi Team,

Below are the follow steps which I followed to connect to the server.

Step 1: Entered the URL

Step 2: Keyed in my Username and Password which is related to my company URL from step1

Step 3: Copied the Access key and Secret key to the clipboard from JIRA

Step 4: Grabbed the Access key and Secret key from the clipboard

Step 5: Pasted those in Zephyr Test case Importer tool 

Step 6: Clicked on "Connect"

 

Then I see an Error fetching the project window with unexpected response code 401 error.

Can guys please resolve the issue or let me know if I em missing anything in the flow.

 

 

Cheers,

Raj

13 answers

4 votes
Errol Hariman September 15, 2019

I was having the same issue in getting the error 401 and finally manage to connect... you might want to follow this step:

  1. Use the latest version of zephyr test case importer should be 0.40 and above right now
  2. Enter the URL with sample like this https://yoursitename.atlassian.net you do not need to add /rest after atlassian.net as many other guides suggest
  3. Enter user email as username ex: myemail.co.xx, please make sure this user email have administrator access to check this go to your user management in jira site and make sure this user assigned with administration access that have all your jira product access, usually the default "administrator" administration access should work (this is usually the main problem)
  4. Enter API Token generated as your password from https://id.atlassian.com/manage/api-tokens  ex: YxHDxxWTxxZ5C4xxRKxfF9A0 do not use your login password (this is usually also the main problem)
  5. Copy Zephyr Access Key and Secret Key from your Jira Site through you left menu "Test - Importer - API Keys" make sure you are using the same user name with point 3
  6. Click on "Connect" button and wait for a while
  7. List of your projects should be visible on the drop downlist and you should select the zephyr enabled type of project
  8. Finally after you get connected there will be a  small blink in the Zephyr test case importer UI that will make your Issue type selection and "Start Import" button not visible you might want to maximize the view in the upper right to solve this visibility bugs

That's all from me and I hope it's also worked for you guys.

Ika_Sri_Cahya September 15, 2019

nice...thank you Errol for helping me with the issue

Like Errol Hariman likes this
Priti Diyewar September 16, 2019

Thanks. It worked.

Like Errol Hariman likes this
Navin October 8, 2019

Thanks Errol, it worked :)

Chris Hahn October 17, 2019

You are a genius! Thank you. This worked for me as well. 

praneeth.gorrepati December 13, 2019

Thank you!! It totally worked!!

sundaravel_L January 5, 2020

Thank You Errol, it worked perfect !!

Suggesting to add this content to the official zephyr for JIRA - Import Test Cases, it would save a lot of time to new users !!

PavanK January 20, 2020

thank you for the detailed steps it worked for me

Josiah Aubin April 2, 2020

This worked awesome, the api token for the password part was where I was stuck! Thanks!

1 vote
Gabriel Smith August 14, 2019

Got it working!  Here is the secret sauce, for the Cloud anyways:

In your ATLASSIAN account, you create an API Token, which is used as your Password along with your username, for which I am having no problems using my email associated with my Jira account.

Then in my Zephyr for Jira enabled Jira Project I go to Tests >> Importer >> Keys and generate the Access Key and Secret Key.

VERY IMPORTANT NOTE:  When you click the copy button it copies both keys together.  You MUST paste into some editor and divide them in the correct place into Access and Secret Keys.  

For the URL, I am using our atlassian cloud url and /rest at the end.  Like https://company.atlassian.net/rest

And then you select the project, issue type, do all the mapping work, etc.

ENJOY!

1 vote
Misha Pankevich August 2, 2019

Hi guys, I tried everything you described above, and still have the same 401 error..

double checked the url, mail address and password, deleted and generated keys.

what else can be done? 

Misha

1 vote
Sebastian Nawara June 25, 2015

Hello, everybody.

I'm facing exactly the same problem. I perform identical steps as Raj and I get the same error screen. The records from logs suggest that I'm using incorrect credentials, but I don't think it's the case. I've just logged into JIRA usig the same login and password (and I tried it on two different users).Still the same. I also regenerated API keys as you suggested in response to Raj's problem. Could you please verify if we're doing thigs right.

LOG ENTRY:

2015-06-25 21:25:39,139 WARN [AWT-EventQueue-0] ConfiguredHttpClient.handleResponse(1097) | Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm="https%3A%2F%2Fit-project.atlassian.net"}

 

Thanks in advance,

Sebastian

Jayesh Wankhade January 6, 2020

Hi @Sebastian Nawar 

Sometimes it always gives the same error. Generate new tokens and then try to login. It will work as I did the same way and it works. I don't know why this happens everytime but thats the only solution for not stopping the work and keep going.

0 votes
Appohm Admin September 28, 2019

I am very disappointed with the tool... I am able to connect to see projects and issue type even able to map xls fields but when I  click start import nothing happens :( 

 

Invested a couple of hours to get it done.

Jayesh Wankhade November 8, 2019

What exact issue you are facing?

0 votes
Lavanya_harikumar August 13, 2019

Hi, 

Even am facing the same issue. Can someone help pls ? 

URL - https://XXXXX.atlassian.net/rest 

User Name - tried both user name & email id 

Re-generated API keys (both access & secure)

Thanks,

Lavanya 

Jayesh Wankhade November 8, 2019

Start with the importer from Command prompt, login and then try. I have faced the same problem but now resolved by the same solution. 

Use the command to start importer from the command prompt.

java -jar <importer-utility-filename.jar>
0 votes
Gabriel Smith August 9, 2019

None of the above seems to work.  And it should not take hours to get a simple import tool to work.  Disappointing.

0 votes
Georgina Gonzalez February 25, 2019

The same problem now and the /rest does not fix the problem. Is there any workaround? 

Ismael Gutierrez March 14, 2019

/rest not working for me either :)... did you solve it? If i do I will share to you. Regards Gina!!

Georgina Gonzalez March 14, 2019

Hey Ismael,

Nice to see you here :) It worked with another user, so for some reason after the 401 error, the main user did not work for uploading test cases anymore.

Ismael Gutierrez March 14, 2019

This is what worked for us:

 

Delete the current keys going to API keys, then Delete the keys:

DeleteKey.JPG

Confirm Deletion

ConfirmDelete.JPG

Then Generate new keys:

GenerateNewKey.JPG

And then use those new keys in the importer tool. There was some suggestions online that just Regenerating keys (little pencil next to delete button) should work, but that option did not work for us.

Like Georgina Gonzalez likes this
0 votes
Filip Ionita November 16, 2018

I have the same problem right now in 2018.... How do you fix this? I can't import anything which makes the tool useless.  Tried putting /rest at the end and no luck. JIRA doesn't use User Names any more either.

Georgina Gonzalez February 25, 2019

Filip, did you find a workaround?

0 votes
Brian Ross July 24, 2015

for your user name, use the User Name that is in your JIRA account and not your email address.  Also in your URL, at the end of it, put   /rest

 

Good luck!

 

MarisaB September 28, 2015

This worked! Thanks for posting!

Brian Ross September 29, 2015

Glad it helped! I know it took me a little while to work out most of the issues.

0 votes
AlexandraS July 20, 2015

Hello,

I'm seeing the same issues that were reported above where i receive the following error message when I try to connect to the importer: "Unexpected response code: 401"

I have confirmed that I am entering in the correct username/password and have regenerated the API keys, but I still receive the same error. Has there been any resolution to the problems that everyone has been facing?

Thanks,

Alex

0 votes
vimal kumar June 24, 2015

Hello Saigiriraj,

 

Could you please double check the username and password of JIRA. Also please try to regenerate API keys and then use the same in importer. Please access through the below link for the knowledge based documentation to import tests in Zephyr for JIRA cloud.

https://support.getzephyr.com/hc/en-us/articles/204550179-How-do-I-import-test-cases-into-Zephyr-for-JIRA-Cloud-

Please raise a support ticket with us by access through the below link,if the issue persists.

https://support.getzephyr.com/hc/en-us

 

Regards,

Zephyr Support. 

 

0 votes
saigiriraj saggu June 24, 2015

 

25-06-2015 4-12-15 p.m..png

 

saigiriraj saggu June 24, 2015

Screenshot for the Above issue

Suggest an answer

Log in or Sign up to answer