Skip to content

Using ScalaTest tags to filter SlowTest and run them differently#154

Open
oliviertoupin wants to merge 1 commit intomasterfrom
olivier-fix-build2
Open

Using ScalaTest tags to filter SlowTest and run them differently#154
oliviertoupin wants to merge 1 commit intomasterfrom
olivier-fix-build2

Conversation

@oliviertoupin
Copy link
Contributor

No description provided.

@oliviertoupin
Copy link
Contributor Author

@coderunner @alex-wajam @mlaflamm @clementgarnier

@oliviertoupin
Copy link
Contributor Author

@oliviertoupin
Copy link
Contributor Author

@oliviertoupin
Copy link
Contributor Author

Running the normal tests -> sbt test
Running the slow tests -> sbt slow:test

Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you put in inside package.scala?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I could have put it in test/Tags.scala... But we should anyway but it in some kinds of commons, along with CPUTest, NetworkTest, DiskTest, since those are not specific.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the global package.scala file is a good common for theses. They could still end up in the same file (I like Tags.scala).

And they're not in any commons right now, but might always be extracted one day. commons-tests maybe?

@oliviertoupin
Copy link
Contributor Author

An improvement would be to use http://code.google.com/p/scalatest/source/browse/#svn%2Ftrunk%2Fsrc%2Fmain%2Fjava%2Forg%2Fscalatest%2Ftags

But it's not in any release, or have something like it in ScalaCommons-Test (Because it requires scalatests we don't want to put it in the real thing)

@alexbergeron
Copy link
Contributor

Looks good, but I'd like to let somebody else (maybe @coderunner) to look at it one last time before merging

@coderunner
Copy link
Contributor

This complexifies the build a lot and add custom configs just to run a single test. Why not just put the test along with future performance tests in Integration tests instead?

@coderunner
Copy link
Contributor

Just to be clear, I'm not against tagging the test. It is more the build modifications that I think are not worth it especially because we can solve the problem in a much simpler way.

If we decide to use a Tag, then I would move the tag definition to scala-commons (commons-test) in com.wajam.commons.tags and call it PerformanceTest instead of SlowTest.

@oliviertoupin
Copy link
Contributor Author

@coderunner I agree but:

A - I wanted to prove and show it's possible
B - I see it as a first step towards integrating tags in tests.
C - I have a longer term plan that I wish to talk to you about when you have 5 minutes.

@everyone-else

Any other suggestions, concerns, comments?

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