How to setup the CLI interface and beast-shell - Maven project #ucrbeast #beast - scala

how do I execute the instructions below?
"CLI: To setup the CLI interface and beast-shell, extract the binary package in .tar.gz format. Run $BEAST/bin/beast to launch the command line interface."
then I need to run the command line to create a Maven project.
Dev: To create a new Java/Scala project for Beast using the following command.
mvn archetype:generate -DgroupId=com.example.beastExample -DartifactId=beast-project \
-DarchetypeGroupId=edu.ucr.cs.bdlab -DarchetypeArtifactId=beast-spark -DarchetypeVersion=0.9.5-RC2
I already ran the first line of the command in cmd but something is missing.
does the entire command only work if executing the first part of the statement first?

Related

Unable to run/debug robot tests in vscode - robocorp extensions installed

I have installed Robocorp Code as well as Robot Framework Language Server and have configured them. However, I am still having errors when trying to run the tests via the code lens options.
Repo - A webapi repo with a specific folder containing all tests. Lets call it regression.
RF - 4.1.3
Python - 3.8
This is what happens when I click on Run on the code lens for any of the tests -
`PS C:\git\xxxx\regression> C:; cd 'C:\git\xxxx\regression'; &
'C:\Users\xxxx\AppData\Local\Temp\rf-ls-run\run_env_00_smh5defr.bat'
'-u'
'c:\Users\xxxx.vscode\extensions\robocorp.robotframework-lsp-0.47.2\src\robotframework_debug_adapter\run_robot__main__.py'
'--port' '54331' '--no-debug' '--argumentfile'
'C:\git\xxxx\regression\args-local.txt' '--pythonpath'
'c:\git\xxxx\regression\common\lib' '--variable'
'EXECDIR:C:/git/xxxx/regression'
'--prerunmodifier=robotframework_debug_adapter.prerun_modifiers.FilteringTestsSuiteVisitor'
'c:\git\xxxx\regression\api\api_Test.robot'
[ ERROR ] Parsing'--pythonpath' failed: File or directory to execute does not exist.
However, the test starts if I remove the argumentfile parameter but it, of course, fails because its missing arguments from the file.
Do note that the folder specified in pythopath exists and has some python libraries needed for the tests.

Is it possible to run 2 sbt projects at the same time?

I have 2 sbt projects that are runnable (akka app and another play application).
Is it possible to run both of them, and use ~reStart so they refresh on any changes to my project?
Any tips on doing this correctly so I don't run out of memory also?
If you are using Play Framework's latest version you can ~run without any plugin. Regarding standalone akka application you may use a library called sbt-revolver
runAkkaServer := {
(reStart in Compile in `akka-server`).evaluated
}
runWebServer := {
(~run in Compile in `web-server`).evaluated
}
mainClass in reStart := Some("com.example.MainAkka")
val runAkkaServer = inputKey[Unit]("Runs akka-server")
val runWebServer = inputKey[Unit]("Runs web-server")
NOTE: you can run both applications in restart mode without custom tasks:
1. ~run - Play server
2. reStart - Standalone
UPDATE:
I've tried to use following command to both of them, it seems that sbt-revolver is kinda trick and killing application onstart. When replace reStart with run it works perfect, but doesn't trigger changes.
screen -d -m sbt runAppServer; screen -d -m sbt runWebServer
So above code just doesnot behave as expected. Instead of custom tasks, we can run them in separate windows like this:
screen -dmS "appserver" sh -c "sbt 'project appserver;~reStart'; exec bash" ; screen -dmS "webserver" sh -c "sbt runWebServer; exec bash"
Also sbt runWebServer can be replaced by sbt 'project anothersubmodule;~run' if you wish.
I've created a simple demonstration project, you can find here
In order to start you can call just: ./starter.sh
NOTE: you can install screen command if you don't have easily.
Open two different Terminal tabs; cd into the specific directory in each tab and then run with SBT.
sbt run
For multiple web apps, specify a different port:
sbt run -Dhttp.port=8888

Cannot find or load main class com.yahoo.ycsb.Client

I'm trying to create a custom database binding, FooStore, for YCSB. I've compiled this via
mvn -pl com.yahoo.ycsb:foostore -am package
to a jar file, which I've tried to add to the classpath per Step 7
java -cp lib/foostore-0.13.0-SNAPSHOT.jar com.yahoo.ycsb.Client
-load -db com.yahoo.ycsb.db.FooStoreClient -P workloads/workloada
which I'm executing from the ycsb-0.12.0 directory (with my new jar file in the lib directory), which results in
Error: Could not find or load main class com.yahoo.ycsb.Client
Where should I be executing the java command from, and/or which jar(s) do I need to add to my classpath in order to fix this command?
Alternatively, how do I modify YCSB so that I can recompile it via mvn package and then simply execute ./bin/ycsb load foostore -P workloads/workloada
Have you tried to add a database keyword in ycsb?
Maven gave you a ycsb-foostore-binding-0.13.0-SNAPSHOT.tar.gz. Untar it (in another directory).
Edit ycsb-foostore-binding-0.13.0-SNAPSHOT/bin/ycsb and edit the DATABASES dictionary by adding a line like:
"foostore" : "com.yahoo.ycsb.db.FooStoreClient",
Run your custom YCSB:
cd ycsb-foostore-binding-0.13.0-SNAPSHOT/
/bin/ycsb load foostore -thread 1 -P workload/worloada -s

Why would Eclipse not be able to include a file when running a PHPUnit test?

I have the following class and unit test in a PHP project in Eclipse:
I know my unit test works as I can run it at the command line:
Now I want to run this test from Eclipse. I set up PHP Unit in Eclipse like this:
However, when I run the PHPUnit tests:
It tells me that it can't include the class file:
/usr/bin/php -c /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/zend_debug/session4910937990995915704.tmp -d asp_tags=off /Applications/eclipse/plugins/org.phpsrc.eclipse.pti.tools.phpunit_0.5.0.R20101103000000/php/tools/phpunit.php --log-junit /var/folders/UA/UAv38snBHd0QMgEPMCmM9U+++TM/-Tmp-/pti_phpunit/phpunit.xml /Volumes/data/domains/et/extjslayout/phpunittest/tests
PHP Warning: include_once(../Product.php): failed to open stream: No such file or directory in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3
PHP Warning: include_once(): Failed opening '../Product.php' for inclusion (include_path='/usr/local/PEAR') in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 3
PHP Fatal error: Class 'Product' not found in /Volumes/data/domains/et/extjslayout/phpunittest/tests/ProductTest.php on line 9
Why would PHPUnit be able to find the class when run from the command line but not when run from Eclipse?
When you start something from the command line, the "current directory" has a well-defined meaning: It's the directory where you started the command.
In Eclipse, what is the "current directory"? It's probably the directory from which you started Eclipse or maybe the folder in which Eclipse is installed.
I haven't used PHP in Eclipse before but for other languages, I can set the current directory in the launch config somewhere. If that doesn't work, define a variable which points to your project and then use absolute paths (using that variable as a starting point).
Have same problem. Found only solution by creating tests with internal PHPUnit wizard like at this screenshot:
Source: HowTo create a Test Case Class from a PHP Class
But following investigate show that your test case file should contain reference to tested code for example like this: require_once 'C:\Apache2\htdocs\jobeet\src\Ibw\JobeetBundle\Utils\Jobeet.php';
Other experiments with plugin config not bringing luck. So in my opinion PHPUnit from PHP Tools not well developed plugin. Consider using MakeGood plugin as better alternative.

Perl Tap-Formatter-Junit problems

I'd like to run Perl tests under Ant and produce XML output in a similar format to that produced by the JUnit Ant task. I tried to install the Tap::Formatter::JUnit module that I downloaded from http://search.cpan.org/dist/TAP-Formatter-JUnit/ and I followed the instructions described in the README file and the installation completes successfully.
But when running prove --formatter Tap::Formatter::JUnit exec.pl, I get the following error:
Can't locate object method "new" via package "Tap::Formatter::JUnit" at C:/Perl/lib/TAP/Object.pm line 133.
The module is named TAP…, not Tap…. Class names are case sensitive.