Categorizing tests according to test result

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Categorizing tests according to test result

Mohammad Al Houssami (Alumni)

Hello all.


I am using the SUnit framework and I have made a script to generate tests and I have more than 5000 tests. I want to know if there is a way I can categorize the tests into Passin Failing and Error categories without having to do that manually. I want to late file out all the passing tests and change something in the code J
Is there any way or this is not possible?
Sorting them according to result rather than alphabetical order would also solve the problem J

Thanks
Mohammad

Reply | Threaded
Open this post in threaded view
|

Re: Categorizing tests according to test result

Stephan Eggermont-3
Hi Mohammad,

You can take a look at TestResult>>historyFor:

Why are you generating unit tests as code with a script? And why do you have many
failing tests?

Stephan
Reply | Threaded
Open this post in threaded view
|

Re: Categorizing tests according to test result

Mohammad Al Houssami (Alumni)
Well I am writing tests for my html5 parser. So the script I have is generating Smalltalk unit test code of all possible combinations a set of html elements. I am using basic data mining to change the expected output.
To make it clear. The tests I have the elements html head body and p opening and closing tags. Any output with no p in the input would generate this tree:
Html
        Head
        Body
I added a little bit of "data mining" to check for any p elements in the input and if that is true the output would be
Html
        Head
        Body
        P
The reason I have many failing tests is because many tests have more than 1 p element and I want to file those out and change the expected output to have 2 p elements ...
Keep in mind I am still a student and have no experience in development so this might be the worst possible way to do things. I am also using Java code to generate the Smalltalk code in which I then file in.

I hope i did not make it so complicated by explaining...

-----Original Message-----
From: Pharo-users [mailto:[hidden email]] On Behalf Of Stephan Eggermont
Sent: Monday, August 26, 2013 4:11 PM
To: [hidden email]
Subject: Re: [Pharo-users] Categorizing tests according to test result

Hi Mohammad,

You can take a look at TestResult>>historyFor:

Why are you generating unit tests as code with a script? And why do you have many failing tests?

Stephan