Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-OS compatibility #5

Merged
merged 7 commits into from
Jul 1, 2020
Merged

Multi-OS compatibility #5

merged 7 commits into from
Jul 1, 2020

Conversation

giograno
Copy link
Contributor

I was trying out the tool on MacOS and I found out that it was crashing due to the some splits on file paths where the file separator was hard-coded for Windows.
I replaced those occurrences with File.separator and it now words for Unix systems.
I also wrote the TestFileTest suite to check the behavior on both Unix and Windows systems.
I did not try to execute the Windows tests tough.

I have a question about the getTagName() method of the TestFile class.
What is that supposed to do? Inspecting the Main it seems it should get the version of the project, but its implementation seems obscure to me.

I also modified the pom file to package everything from Maven.
Thank you very much

@victorgveloso victorgveloso mentioned this pull request Jun 18, 2020
Copy link

@victorgveloso victorgveloso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on Linux. Although the output seems corrupted. The first row doesn't have all the expected test smells:

App,TestClass,TestFilePath,ProductionFilePath,RelativeTestFilePath,RelativeProductionFilePath,Assertion Roulette,Eager Test

It should be

App,Version,TestFilePath,ProductionFilePath,RelativeTestFilePath,RelativeProductionFilePath,Assertion Roulette,Conditional Test Logic,Constructor Initialization,Default Test,EmptyTest,Exception Catching Throwing,General Fixture,Mystery Guest,Print Statement,Redundant Assertion,Sensitive Equality,Verbose Test,Sleepy Test,Eager Test,Lazy Test,Duplicate Assert,Unknown Test,IgnoredTest,Resource Optimism,Magic Number Test,Dependent Test

The other rows seems even worse:

Queue,QueueTest.java,/home/anon/Universidade/Master/Aserg/Tests/Queue/src/test/java/br/ufmg/aserg/anon/queue/QueueTest.java,/home/anon/Universidade/Master/Aserg/Tests/Queue/src/main/java/br/ufmg/aserg/anon/queue/Queue.java,est.java,java,false,0,false,0

est.java should be ./src/test/java/br/ufmg/aserg/anon/queue/QueueTest.java
java should be ./src/main/java/br/ufmg/aserg/anon/queue/Queue.java
0 should be false
As you can see this row have more "columns" than the first one, but have less columns than it was expected.

@giograno
Copy link
Contributor Author

@victorgveloso you are right, I included by mistake df53159 that only computed assertion roulette and eager test (that I needed for other purposes). Now it calculates everything

Copy link

@victorgveloso victorgveloso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@shehan shehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates. Looks good to me.

@shehan shehan merged commit 19adeb4 into TestSmells:master Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants