简体   繁体   中英

Scheduled Execution of Run Button in Intellij Idea

Well I've had a heck of a time getting scheduling working in Intellij Idea. Unfortunately most responses to similar questions refer to Eclipse. Also I have tried command line to no avail with 'can not find class in classpath' issues possibly a TestNG bug. I need hourly scheduling. Suggestions?

BTW I have considered Maven, it's plugin is included with Idea. But it requires a project to be built 'as Maven' from the start, which mine was not. Wonder if my non-Maven project will just import into Maven. Or if there is another better approach to getting hourly test runs with TestNG.

Edit: The command line issue: TestNG, Intellij IDEA, Command Line Test Run Error: Cannot Find Class in Classpath

Thanks!

If you look in the Run window you should see the full command that IntelliJ is actually running for you. If will appear in short form, but if you click on it, it will expand to give you the whole command.

IntelliJ运行窗口

Somewhere in this command you will probably notice a -classpath argument which might be what you were originally having trouble with.

If you take this copy this command and stick it in a .bat / .sh (depending on your platform) you will then be able to use a task scheduler (Task Scheduler, cron, etc.) to achieve your hourly run.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM