I'd like to run tests with Trireme. In node I would do this with "npm test". The package.json:
"scripts": { ... "test": "mocha", ... },
Is there a way I can run such tests with Trireme? Thanks
Can I understand your usecase better please ? trireme just enables node apps to be run on the JVM. Is there any particular reason to have the kind of testing you are suggesting. Would you want the scripts to be launched on a JVM ?
I'm new to Java and Maven, but as I understand Maven for Trireme has a similar role as NPM for Node. I want to use the bitcore-wallet-client module to run on Trireme in combination with some Java library. When I run "npm test" for bitcore-client-wallet it invokes a Mocha binary and runs a test. How are tests done with Trireme? Can a "test" be invoked in the "scripts" section of the package.json? Or are tests done over Maven e.g. the Surefire plugin? However when I "mvn install" for Trireme 0.8.9 I get "Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project trireme-node10src: There are test failures." and "BUILD FAILURE" even with <testFailureIgnore>true</testFailureIgnore>. The surefire report sais: testSecurePair(io.apigee.trireme.node10.test.BasicTest) Time elapsed: 0.364 sec <<< ERROR! Thanks!
I was able to get BUILD SUCCESS by adding the following to the <plugins> of the main pom.xml:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin>
and by running:
maven clean install -DskipTests
But I still can't run the trireme-hello-sample-0.8.9.jar in /samples/java-hello/target
java -jar trireme-hello-sample-0.8.9.jar
It prompts:
no main manifest attribute, in trireme-hello-sample-0.8.9.jar
Should't be the manifest created automatically by Trireme? Do I have to change the pom.xml? Thanks!
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |