#956 ✓ resolved
Mark Piper

Differing behaviour for "auto-test" and "autotest" (!?)

Reported by Mark Piper | July 2nd, 2011 @ 09:29 PM | in 1.2.3 (closed)

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.

Framework version: master-bc12f16
Platform you're using: Ubuntu

Reproduction steps:

1) Create new application with "play new autotestbug"
2) Run "play auto-test" - application runs tests as expected
3) Run "play autotest" - application starts but then waits for a first request, and never runs tests

Details:

The python script framework/pym/play/commands/base.py suggests that "autotest" and "auto-test" are synonymous. However, when using "autotest", the framework id appears to not be set to "test", and therefore the testrunner module never outputs it's line "Go to http://localhost:9000/@tests to run the tests" in the log, which is the line that autotest listens for in order to start running tests (however, see http://play.lighthouseapp.com/projects/57987/tickets/943-autotest-c.... Therefore, the application just sits there waiting for a HTTP request (and even if you force this, @tests is not available because the framework is not "test")

When running "play auto-test", this is the output:

mark@mark-laptop:~/code/workspace/autotestbug$ play auto-test
~ _ _ ~ _ | | _ _ | | ~ | ' \| |/ ' | || || ~ | /||_|_ () ~ |_| |__/
~ ~ play! master-bc12f16, http://www.playframework.org ~ framework ID is test
~ ~ Running in test mode ~ Ctrl+C to stop ~ ~ Deleting /home/mark/code/workspace/autotestbug/tmp ~ Listening for transport dt_socket at address: 8000
22:18:19,839 INFO ~ Starting /home/mark/code/workspace/autotestbug
22:18:21,447 WARN ~ You're running Play! in DEV mode
~ ~ Go to http://localhost:9000/@tests to run the tests ~ ~ 3 tests to run: ~ ~ BasicTest... PASSED 1s ~ ApplicationTest... PASSED 0s ~ Application... PASSED 5s ~ ~ All tests passed

When running "play autotest":

mark@mark-laptop:~/code/workspace/autotestbug$ play autotest
~ _ _ ~ _ | | _ _ | | ~ | ' \| |/ ' | || || ~ | /||_|_ () ~ |_| |__/
~ ~ play! master-bc12f16, http://www.playframework.org ~ ~ Running in test mode ~ Ctrl+C to stop ~ ~ Deleting /home/mark/code/workspace/autotestbug/tmp ~ Listening for transport dt_socket at address: 8000
22:22:58,002 INFO ~ Starting /home/mark/code/workspace/autotestbug
22:22:59,896 WARN ~ You're running Play! in DEV mode
22:22:59,991 INFO ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...

Note that the second example is missing "framework ID is test"

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Play framework

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the http://www.playframework.org website.

Source code is hosted on github

Check out our repository at http://github.com/playframework/play

Contributing, creating a patch

Please read the contributor guide

Reporting Security Vulnerabilities

Since all bug reports are public, please report any security vulnerability directly to guillaume dot bort at gmail dot com.

Creating a bug report

Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.

Shared Ticket Bins

Pages