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

Links to Test Cases in Excel redirect to TestRail Dashboard


#1

Every time I paste a hyperlink to a specific Test Case into Excel, it will redirect me to the TestRail Dashboard and not to the Test Case. This only happens if I am currently logged into TestRail. If I am logged out, I must login, then it will take me to the correct URL. If I email the link to someone, it takes the user to the correct Test Case and not to the Dashboard, no matter if they are logged in or not.

Does anyone know why this happens?


#2

Hello,

Thanks for your posting. My guess is that Excel ignores the part after the question mark in the URL when you click on it and this part is responsible in TestRail to navigate to the correct page. If this part isn’t present, TestRail would show the standard dashboard page. Can you confirm this?

Regards,
Tobias


#3

Hello Tobias,

I have checked this again and this is not the issue.

If the user is not logged into TestRail and they click the link in Excel, they are directed to login, and after they do, they are taken directly to the link.
If the user is logged into TestRail already, they are taken to the Dashboard.

There is an inconsistency that is going on.

Thanks,
Brian


#4

Hello Brian,

Thanks for the additional details. Do you see a message on the dashboard in case the user is already logged in? Also, can you please make sure that Excel points to the correct address in TestRail (e.g. by copying the address in Excel and pasting it manually into your browser)?

Regards,
Tobias


#5

Hello Tobias,

I have verified that there is no message on the dashboard in this case.
Here is the link that is in Excel:
http:///index.php?/tests/view/10231852

Thanks,
Brian


#6

Hello Brian,

Thanks for the additional details and my apology for the delayed response. Have you tried to copy & paste the link from Excel to your browser instead of clicking on the link to see if this makes a difference? Also, could you please take a look at your web server logs to find out the real address? My guess is that Excel changes the address slightly (e.g. by changing the forward slashes to backslashes) and this should tell which address Excel actually tries to open.

Please let me know in case you have any questions and I look forward to your reply.

Regards,
Tobias


#7

Hello Tobias,

I just checked copying and pasting the hyperlink from Excel and it opened the correct page.

Thanks,
Brian


#8

Hello Brian,

Thanks for the feedback. It’s likely that Excel is changing the request URL for some reason. To better diagnose this, can you please ask your TestRail server admin to look into the web server access log to see which exact URL Excel is redirecting you to? You can also send us the relevant log snippet (or entire file) to contact@gurock.com.

Thanks!


#9

It looks this is problem with the redirection.
When a link is clicked the sytem tries to authenticate it.
Then it will redirect the user to login page if not authenticated and then to the page you were coming from that is to the link user want to access. This is :slight_smile:

But if user is logged in already then the redirection is not to the page request is coming from but it goes to the dashboard page. This is error.

Please fix this problem of redirection else it become difficult to navigate between the pages.


#10

Hello,

Thanks for your posting. What happens if you paste/enter the web address manually to the web browsers instead of clicking on the Excel link? My guess is that this should work just fine and I believe Excel is sending the request slightly differently/incorrect (e.g. by changing the slashes or similar). Could you try this please?

Regards,
Tobias


#11

Hi guys,

I have recently come across this issue when I swapped my PC over to a new machine. Same version of Excel, same formatted excel sheet (the hyperlinks previously worked fine), different OS (Windows 8.1 vs Windows Server 2008 R2).

I’ll try dig into what is causing this issue, but I can guarantee you it is not from the TestRail side.

Glenn


#12

OK - this occurs when you do not have Internet Explorer as your default browser, and you have not logged in to TestRail in Internet Explorer (and set it to remember your credentials).

I closed Chrome (my default browser), navigated to the TestRail dashboard in IE, logged in to TestRail, and then closed IE. After that, links from Excel started working as expected again.


#13

Hello Glenn,

Thanks for troubleshooting this, that’s appreciated. This will definitely help the next time we see this issue.

Regards,
Tobias


#14

Hi all,

I believe problem is that Excel has quite a strange behavior regarding links and clicking on them. I believe the moment you click on a link, Excel tries to retrieve the page information itself in the background before opening the default web browser. If you are not logged in to TestRail the Excel check might fail. I don’t know why Excel tries to access the page before simply opening the default web browser like any other application would do it, but this might result in different behaviors depending on whether you are logged in to TestRail in Internet Explorer.

Thanks,
Dennis


#15

I have been facing the same problem and I would say that the problem is not in excel and it is in Testrail page urls and security techniques.
? in the link is the problem this is what I initially thought but I was wrong. Facebook link to photos also contains ? and excel is able to open the correct photo even if the photo ID is after the Question mark.
Hence this proves that the ? in testrail link is not the problem.

And excel is correctly encoding the URL in his system without any error.

Problem clearly lies in the redirection of URL when testrail receives the URL it logs in and authenticate and in the process it forgets where to redirect and directs to dashboard.

While other links can perfectly emulate correctly from testrail even with question mark it proves that the problem clearly lies in Testrail.
Also it shows that it happens only when clicked on excel and not when clicked on outlook. This proves that this combo of link clicked on excel is not received correctly by testrail initially.

Kindly look more into the issue and solve it by improving the URL’s linking.


#16

Hello Nilesh,

Thanks for your reply! When accessing the address directly in your browser (e.g. via copying and pasting the URL), even when not logged into TestRail this works as expected with the correct redirect, and so this would just indicate that there’s an issue with the way Excel handles this (as Dennis mentioned above, it appears that Excel attempts to access the page first which breaks the redirect). This works best when already logged into TestRail and so we would just recommend keeping a session open when working with links from Excel. Hope this helps!

Regards,
Marco


#17

Hello
As I already stated logging into the session in chrome while we click links in the excel does not help and it is not working.

This is sadly not helping here.

Regards,
Nilesh


#18

Hi Nilish,

Thanks for your feedback! We would just recommend copying the link and pasting this directly in your browser, as this is a limitation in Excel that we can’t control, and this works as expected in other applications.

Regards,
Marco


#19

I would like to give you a suggestion to solve this.

Give us a URL encode method which we could use in excel. the URL will encode in such a way that it will not let excel nullify the redirection and open browser right away.

So what we would do is we will go to your encoder website encode our testrail URL and then put it in Excel.
I believe this could be the solution :slight_smile:

Let me know what you think on this.