test cases as they are returned from the getTestCase API call
This is different from other calls that return TestCases
Inheritance: TL_Data, TL_Element
Example #1
0
        public void getTestCaseById()
        {
            int tcid = TestCaseIdWithVersions;

            Meyn.TestLink.TestCase tc = proxy.GetTestCase(tcid);
            Assert.IsNotNull(tc, "should have a test case");
            Console.WriteLine("Found {0}:{1} Version:{2}", tc.id, tc.name, tc.version);
        }
Example #2
0
        public void TestCaseAttachmentCreation()
        {
            int tcid = TestCaseToUseWithAttachments;

            Meyn.TestLink.TestCase tc = proxy.GetTestCase(tcid);

            byte[] content = new byte[4];
            content[0] = 48;
            content[1] = 49;
            content[2] = 50;
            content[3] = 51;

            AttachmentRequestResponse r = proxy.UploadTestCaseAttachment(tcid, "fileX.txt", "text/plain", content, "some result", "a description");

            Assert.AreEqual(r.foreignKeyId, tcid);
            Console.WriteLine("Upload Response id:{0}, table '{1}', title:'{2}' size:{3}", r.foreignKeyId, r.linkedTableName, r.title, r.size);
        }
Example #3
0
        public void getTestCaseWithSteps()
        {
            int tcId = TestCaseIdWithSteps;

            Meyn.TestLink.TestCase tc = proxy.GetTestCase(tcId);
            Assert.IsNotNull(tc);
            Assert.AreEqual(4, tc.steps.Count, " there should be 4 steps in tc named {0}. Check the Testlink DB", tc.name);
            for (int idx = 0; idx < 4; idx++)
            {
                TestStep ts = tc.steps[idx];
                Assert.AreEqual(idx + 1, ts.step_number);
                if (idx == 2)
                {
                    Assert.AreEqual(2, ts.execution_type);
                }
                else
                {
                    Assert.AreEqual(1, ts.execution_type);
                }
                Assert.IsNotEmpty(ts.actions);
                Assert.IsNotEmpty(ts.expected_results);
            }
        }