Page 1 of 1

JIRA plugin - Object ref not set to an instance of an object

Posted: Wed Jan 21, 2015 3:19 pm
by craig242
Hi all,

Wondering if anyone could help with regards to the JIRA plugin.

I am getting a 'Object reference not set to an instance of an object' error when using the 'JiraReporter.AutoCreateNewIssueIfTestCaseFails' action.

The stack trace is:
at JiraReporter.AutoCreateNewIssueIfTestCaseFails.Ranorex.Core.Testing.ITestModule.Run() at Ranorex.Core.Testing.TestSuiteModule.RunInternal(DataContext parentDataContext)

The setup JIRA action InitializeJiraReporter successfully passes test as per below:
InitializeJiraReporter (JiraReporter) Current variable values: $JiraUserName = '??', $JiraPassword = '??', $JiraServerURL = '??'
00:03.264 Info User JIRA -- 6.4-OD-13-026

I then run a very basic test for testing purposes, followed by the create issue JIRA plugin.

All the variables have been binded.

Does anyone know what is causing the error?

Could it be down to a mandatory field on my JIRA system that is not included in the ranorex plugin i.e. Severity?

Thanks
Craig

Re: JIRA plugin - Object ref not set to an instance of an object

Posted: Thu Jan 22, 2015 3:05 pm
by Support Team
Hello Craig,

Can you please explain in more detail how you use the 'JiraReporter.AutoCreateNewIssueIfTestCaseFails' action.
Would it be possible to send us your solution in order to check why you get the error?

Regards,
Bernhard

Re: JIRA plugin - Object ref not set to an instance of an object

Posted: Thu Jan 22, 2015 6:00 pm
by craig242
Hi, thanks for the reply.

I am only testing how the JIRA plugin would work so have a very basic test as per below:

Setup
InitializeJiraReporter (JiraReporter) is started and successfully completes (I see 'Test Module 'InitializeJiraReporter' completed with status 'Success'.

I then open IE, check that a field exists (which it does) then close the browser (like I said, very simple for testing purposes).

Teardown
AutoCreateNewIssueIfTestCaseFails (JiraReporter)
When the test run gets to this point I get the 'Object reference not set to an instance of an object' error.

I can see the mapped bindings in the rxlog and they all appear. (i.e. JIRAprojectKey, JIRAIssueType etc). Also I know that the mappings are OK as the Initializer module runs successfully (i.e. connects to the JIRA server).

So basically all I am trying to do is simulate a JIRA being raised if the test fails (by the way I have tried both test outcomes, pass or fail, by modifying the validation after the web page is opened, results in no difference).

I can then incorporate this into our API checking tests, so if one is down, a JIRA is raised.

Hopefully that helps.
Also, is there somewhere secure I could upload the solution as requested?

Craig


EDIT:: Attachment added.

Re: JIRA plugin - Object ref not set to an instance of an object

Posted: Mon Jan 26, 2015 1:02 pm
by craig242
Hi,

I have managed to get the JIRA plugin to successfully complete, however a JIRA issue is not being created.

Can someone please explain how I go about setting up the REST API in JIRA?

Thanks,
Craig.

Re: JIRA plugin - Object ref not set to an instance of an object

Posted: Mon Jan 26, 2015 5:17 pm
by Support Team
Hello Craig,

Thank you for the detailed description.
It looks good and should work. I already tried to send you an email with the access details to for our ftp server, but the email was rejected. Can you please send an email to [email protected]. I will send you the access details back.
It would be nice if you could upload your project and we will analyze it on our machines.
Thank you!

Regards,
Bernhard

Re: JIRA plugin - Object ref not set to an instance of an object

Posted: Wed Jan 28, 2015 10:34 am
by craig242
Hi Bernhard,

Apologies my email address has changed as I have moved company. It has now been updated in my profile.

Thanks
Craig

Re: JIRA plugin - Object ref not set to an instance of an object

Posted: Wed Jan 28, 2015 10:53 am
by Support Team
Hi Craig,

No problem.
I already sent you the upload details to your new e-mail address.

Regards,
Bernhard

Re: JIRA plugin - Object ref not set to an instance of an object

Posted: Tue Mar 24, 2015 7:44 pm
by zoework
Is there a solution to this problem?
I have similar issues - custom fields in Jira - and would like to know how to set a value for them in the Ranorex bindings.
Thanks,
Zoe

Re: JIRA plugin - Object ref not set to an instance of an object

Posted: Wed Mar 25, 2015 5:25 pm
by Support Team
Hello Zoe,

I think my colleague Christian already answered your question on the blog post directly.

Regards,
Bernhard