I am using eclipse EPIC (Perl plug-in) to run my Perl scripts. The scripts are running fine. but I want group my scripts and run together at a go. How can I do this?
我使用eclipse EPIC(Perl插件)来运行我的Perl脚本。脚本运行正常。但是我希望将我的脚本分组并一起运行。我怎样才能做到这一点?
The scripts I am running are test cases. So basically it would be nice if I can take the results of each script and display them in table like fashion or write into a file all the results. How can I do this too?
我运行的脚本是测试用例。所以基本上如果我可以获取每个脚本的结果并将它们像表格一样显示在表格中或者将所有结果写入文件中,那将是很好的。我怎么能这样做?
And can I connect to remote host to run the scripts?
我可以连接到远程主机来运行脚本吗?
2 个解决方案
#1
If you are using Windows, you can use a batch (.bat) file to run the scripts in groups. Create a testcase.bat file in your text editor and type the following lines in it:
如果您使用的是Windows,则可以使用批处理(.bat)文件在组中运行脚本。在文本编辑器中创建一个testcase.bat文件,并在其中键入以下行:
perl script1.pl
perl script2.pl
perl script3.pl
where script1.pl, script2.pl and script3.pl are your script filenames.
其中script1.pl,script2.pl和script3.pl是您的脚本文件名。
Then run the testcase.bat file from your command line.
然后从命令行运行testcase.bat文件。
You will have to print your outputs from each script to a common file by opening a filehandle. The 'append' mode ">>" will be useful here.
您必须通过打开文件句柄将每个脚本的输出打印到公共文件。 'append'模式“>>”在这里很有用。
#2
Use "external tool configuration" in eclipse and run the
在eclipse中使用“外部工具配置”并运行
prove -l
command from your workspace directory ( I assume all the modules are under lib/ ).
来自工作区目录的命令(我假设所有模块都在lib /下)。
It is a Perl app, from Test::More that is the basic for all tests, and prints nice reports. I use it under Windows.
它是一个Perl应用程序,来自Test :: More,它是所有测试的基础,并打印出漂亮的报告。我在Windows下使用它。
If you want also to check how to improve your tests use Devel::Cover, a very powerfull tool,
如果你还想检查如何改进你的测试使用Devel :: Cover,一个非常强大的工具,
read this short article/how-to if you want
如果你愿意,请阅读这篇短文/操作方法
http://perl-node-interface.blogspot.com/2011/06/how-to-use-develcover.html
about how to use Devel::Cover on Windows.
关于如何在Windows上使用Devel :: Cover。
#1
If you are using Windows, you can use a batch (.bat) file to run the scripts in groups. Create a testcase.bat file in your text editor and type the following lines in it:
如果您使用的是Windows,则可以使用批处理(.bat)文件在组中运行脚本。在文本编辑器中创建一个testcase.bat文件,并在其中键入以下行:
perl script1.pl
perl script2.pl
perl script3.pl
where script1.pl, script2.pl and script3.pl are your script filenames.
其中script1.pl,script2.pl和script3.pl是您的脚本文件名。
Then run the testcase.bat file from your command line.
然后从命令行运行testcase.bat文件。
You will have to print your outputs from each script to a common file by opening a filehandle. The 'append' mode ">>" will be useful here.
您必须通过打开文件句柄将每个脚本的输出打印到公共文件。 'append'模式“>>”在这里很有用。
#2
Use "external tool configuration" in eclipse and run the
在eclipse中使用“外部工具配置”并运行
prove -l
command from your workspace directory ( I assume all the modules are under lib/ ).
来自工作区目录的命令(我假设所有模块都在lib /下)。
It is a Perl app, from Test::More that is the basic for all tests, and prints nice reports. I use it under Windows.
它是一个Perl应用程序,来自Test :: More,它是所有测试的基础,并打印出漂亮的报告。我在Windows下使用它。
If you want also to check how to improve your tests use Devel::Cover, a very powerfull tool,
如果你还想检查如何改进你的测试使用Devel :: Cover,一个非常强大的工具,
read this short article/how-to if you want
如果你愿意,请阅读这篇短文/操作方法
http://perl-node-interface.blogspot.com/2011/06/how-to-use-develcover.html
about how to use Devel::Cover on Windows.
关于如何在Windows上使用Devel :: Cover。