Hi All,
how can I track the number of testcases without starting the whole testsuite ( sum of success + failed)
many thx
Hannes
tracking number of Test Cases
Re: tracking number of Test Cases
Hi,
I'm afraid, I don't understand your question? Number of success/failed tests is always listed in report and it's only available at the end of test suite run. So I'm not quite sure what exactly do you want to achieve?
I'm afraid, I don't understand your question? Number of success/failed tests is always listed in report and it's only available at the end of test suite run. So I'm not quite sure what exactly do you want to achieve?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: tracking number of Test Cases
I quite like knowing how many Test Cases I have in a feature's Test Suite too. But to gather that information I also have to run the tests, to generate the report, which tells me the total.
Could you scan the entire test suite via a code module and detect Test Cases rather than Smart Folders, and count them manually that way?
:
Hmmm, the ITestContainer has IsSmartFolder and IsTestCase properties, but doesn't seem to have a way to dig deeper into the hierarchy. Oh well, bang goes that thought.
Could you scan the entire test suite via a code module and detect Test Cases rather than Smart Folders, and count them manually that way?
:
Hmmm, the ITestContainer has IsSmartFolder and IsTestCase properties, but doesn't seem to have a way to dig deeper into the hierarchy. Oh well, bang goes that thought.
Re: tracking number of Test Cases
Hi,
In case you just want to get a number of testcases/smart folders, without knowing their status at the end of test, you can use something like this:
Hope this helps?
In case you just want to get a number of testcases/smart folders, without knowing their status at the end of test, you can use something like this:
Code: Select all
int tcCount=0, sfCount= 0;
var testSuite = (TestSuite) TestSuite.Current;
IList<TestSuiteEntry> entries = testSuite.GetAllTestSuiteEntries();
foreach(var entry in entries)
{
if ((entry is TestCaseNode) && (!(entry as TestCaseNode).IsRootTestCase && !(entry as TestCaseNode).IsSmartFolder))
{
tcCount = tcCount + 1;
}
if ((entry is TestCaseNode) && (!(entry as TestCaseNode).IsRootTestCase && (entry as TestCaseNode).IsSmartFolder && !(entry as TestCaseNode).IsTestCase))
{
sfCount = sfCount + 1;
}
}
Report.Info("User","Number of TestCases:" + tcCount);
Report.Info("User","Number of SmartFolders:" + sfCount);
Last edited by odklizec on Thu Jun 20, 2019 1:43 pm, edited 3 times in total.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: tracking number of Test Cases
Ack, I missed the GetAllTestSuiteEntries() API! D'oh.
But I just this minute upgraded to Ranorex v9.1 for the first time and am admiring the improved progress dialog, which now includes a count of all Test Cases. So I just ran one Test Suite to see how many it had.
Whoop:
But I just this minute upgraded to Ranorex v9.1 for the first time and am admiring the improved progress dialog, which now includes a count of all Test Cases. So I just ran one Test Suite to see how many it had.
Whoop:
Re: tracking number of Test Cases
thx All
)
