-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given a success message that results pass but nothing is posted #2
Comments
@jbhennin, Publishing 1 test result(s) to https://test_domain/index.php Here is the Protractor config: Seems like it is configuration issue, @awaragi can you suggest what I can do to make it work with Protractor? Thanks, |
I will take a look at the issue. I have tested the reporter primary with mocha vanilla so I don't have a projet with protractor. If this is a small test projet, can you please share it so that I can look deeper? |
@awaragi , Prerequisites:
The webdriver-manager is a helper tool to easily get an instance of a Selenium Server running. Use it to download the necessary binaries with:
Thanks, |
@awaragi npm run exampleRequestTR |
okay. so I've looked at the issue and the problem is that protactor is not waiting for the submissions to be processed. Basically the submission of results to testrail is getting lost! In Mocha, the --no-exit flag was enough to tell node not to quit until all events have been processed. protactor does not seems to be passing this flag to mocha runner. I will try to see if I can rework the code to use a different http agent. |
the noExit configuration value you added to the mochaOptions is only used in the bin/mocha script therefore it is not applicable to the mocha runner via code as called by protactor. This is harder than I thought as the concept of sync http request does not exists natively in nodejs without external modules. (see mochajs/mocha@55a33ce) |
@jbhennin you simply need to add --no-exit to your mocha call for the publication to work. |
@awaragi , so is there any chance to see it working with Protractor in the nearest future? |
Hi, Here is the code which fails on the = request(....
|
I just had the same issue using Mocha. I've resolved it two ways - Firstly, I added the --no-exit arg. This informed me that there was an authentication problem. Seems that authentication fails when using the API Key. Works fine with password. |
That's exactly my proposed solution for mocha. Unfortunately protractor does not have the same flag. As for the API key, I have it linked to a production environment and it works great. I am surprised it does not work for you! |
You're right. The API key does work. My bad. Didn't realise you need to save the settings page in Testrail after generating the key. |
Looks like this is related to mochajs/mocha#2541. It looks like the mocha Runner doesn't really support asynchronous code well within its EventEmitter functionality. We ended up using |
Unfortunately moch reports and jasmine are not the same. So I don’t think so. |
Hi @awaragi I tried using this plugin for the mocha test that I have. and same concern is that it will say success but nothing is published in testrail. I did try to put |
Hi, do you mind sharing a little bit of your project? got quite few projects internally that use it and it seems to work. Ensure that the project in testrail is multi-suite otherwise it will not work. |
Hi, I'm sorry but can you elaborate more on the multi-suite part? i'm new with testrail. this is the script / test i'm running.
by the way. do we need to manually create a test run for this? or it will automatically create based on the project and suite you provide in the opts file? since I have 5 Test Suites in the project in testrail containing test cases. but I only want to test 1 Test Suite? is that possible? |
I was able to make it published. I think the reason why its not publishing because of the unhandled rejection on self certificate. And I was able to make it work by putting this into the script. |
Most likely that was the problem. Ive only tested it with hosted instance of Testrail. The reporter accepts several parameters such as project id and suite id, so you should be able to publish tests for 1 suite without any issues. The opposite is not supported (and does not make senses since test runs are based on one suite at a time). |
Thank you for the clarification. |
I am able to solve problem with use of promises. |
Receive: Publishing 2 test result(s) to 'mytestrail.net'
Log into testrail and no results have been logged
I am using a user and apikey
I suspect that there is an issue with the post request you guys are submitting as I have used dummy url and bad username and no errors are logged to the console.
The text was updated successfully, but these errors were encountered: