Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Trying to integrate MS-test unittest with gemini.

testing

I am trying to run the sample unit test using MS-Test which i downloaded from the countersoft.In this case

I am getting the following error like

QTAgent32.exe Error: 0 : CounterSoft.Gemini.Commons.Rest.GeminiRestException: Method requires authentication at CounterSoft.Gemini.WebServices.BaseService.ThrowResponseException(WebResponse response) at CounterSoft.Gemini.WebServices.BaseService.ProcessResponse[T](String url, Object obj, RequestType requestType) at CounterSoft.Gemini.WebServices.BaseService.GetResponse[T](String url, Object o, RequestType r) at CounterSoft.Gemini.WebServices.BaseService.WhoAmI() at Countersoft.Gemini.UnitTesting.GeminiContext.GetTestRun(GeminiConfigurationAttribute config, Int32 testCaseId) in C:\Documents and Settings\thraja\Desktop\countersoftgeminiunittestingv411\Countersoft.Gemini.UnitTesting\GeminiContext.cs:line 24 at Countersoft.Gemini.UnitTesting.GeminiTestCaseAspect.RecordTest(GeminiTestCaseAttribute testCaseAttr, IMessage msg, ReturnMessage returnMsg) in C:\Documents and Settings\thraja\Desktop\countersoftgeminiunittestingv411\Countersoft.Gemini.UnitTesting\GeminiTestCaseAspect.cs:line 76

User29894
· 1
User29894
Replies (21)
helpful
0
not helpful

Did you update the GeminiConfiguration attribute to use your username and passwrod?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Yes i did.Actually gemini is installed in a server.I am running it from my local.

[GeminiConfiguration("http://server/gemini", "myname", "password", false, true, 4)]

[TestClass] public class UnitTest1 : GeminiTestFixture {

    /// <summary>
    /// Example of a test case that should pass.
    /// Raise bug will only fire if the test has failed.
    /// </summary>
    [TestMethod]
    [GeminiTestCase(7)]
    [GeminiRaiseBug]
    public void TestMethod1()
    {
        Assert.AreEqual(1, 1, "1 Not Equals to 1....");
    }

}


User29894
· 1
User29894
helpful
0
not helpful

Which version of Gemini are you running? The error suggests that the username and / or password are wrong. Are these the same credentials you enter to Gemini when logging in?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Gemini 4.1.1


User29894
· 1
User29894
helpful
0
not helpful

i am just download the unittest project and changed the gemini URL,username and password.what else i need to do??


User29894
· 1
User29894
helpful
0
not helpful

No, nothing else to change. Can you please use fiddler and check the response from the server?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Opps SORRY! You should use your api key and not password.... See the profile link top right when logged in to Gemini for your api key.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

I put the ApiKey.where do i get TestPlanId and TestcaseId?


User29894
· 1
User29894
helpful
0
not helpful

i created two test cases under a testplan.do we need to put the TestplanId and testcaseId in the following code? [GeminiConfiguration("http://server/gemini", "username", "eegrbkdv5z", false, true, 4)] [TestClass] public class Test : GeminiTestFixture { [TestMethod] [GeminiTestCase(6)] [GeminiRaiseBug] public void GeminiTestMethod1() { Assert.AreEqual(1, 0, "1 Not Equals to 1...."); } }


User29894
· 1
User29894
helpful
0
not helpful

You can get the case id from the cases list page and the plan id from the test plans link of the case.

You will need to put the plan id in the GeminiConfiguration attribuye (4) and the case id in the GeminiTestCase (6).


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

I couldn't find the TestPlanId?


User29894
· 1
User29894
helpful
0
not helpful

It will be in the address bar when going to the plan and editing it.


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Yes i got it..The following test will fail.I this case it should need to create a gemini ticket.but its not creating..

Assert.AreEqual(1, 0, "1 Not Equals to 1....");


User29894
· 1
User29894
helpful
0
not helpful

Do you have permissions to create items in Gemini?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

its creating a ticket now but Run Statistics it says 1 passed!!


User29894
· 1
User29894
helpful
0
not helpful

Are you running it as part of a test plan? If so check the plan's stats!


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Yep.In plan's stats it says 1 passed instead of failed..


User29894
· 1
User29894
helpful
0
not helpful

Do you have a run that is marked as failed in the runs tab? Also, what does the plan stats show (0 1 0)?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

No it doesn't marked as failed.its says passed and creating the new ticket.but actually the test has failed in visual studio..plan stats show (0 1 0)?


User29894
· 1
User29894
helpful
0
not helpful

Please answer the above question.


User29894
· 1
User29894
helpful
0
not helpful

Please send us (support at countersoft dot com) screenshoots of the test plan, test case and test run pages + your test code.


Saar Cohen
· 5000
Saar Cohen