Unable to run selenium Java script via junit runner

525 views
Skip to first unread message

ybus...@alpha-sense.com

unread,
Aug 30, 2016, 3:01:31 AM8/30/16
to codename-taurus
Hello,

I'm trying to run the taurus yaml file with Java selenium script using Junit runner and failed with it. Will be glad if someone have any hint for me...
By the way, selenium executor work fine with simple selenium requests without additional script and Junit executor.

Log:
 bzt TaurusScript.yml
09:46:59 INFO: Taurus CLI Tool v1.6.7
09:46:59 INFO: Starting with configs: ['TaurusScript.yml']
09:46:59 INFO: Configuring...
09:46:59 INFO: No personal config: /home/alphasense/.bzt-rc
09:46:59 INFO: Artifacts dir: /tmp/taurus-2016-08-30_09-46-59.698723bzt
09:46:59 INFO: Preparing...
09:47:00 INFO: Installing Selenium server
100% [=======================================================================================================================================================================] Time: 0:00:04
09:47:04 INFO: Installing JUnit
09:47:04 INFO: Will install JUnit into /home/alphasense/.bzt/selenium-taurus/tools/junit
09:47:05 INFO: Downloading: http://search.maven.org/remotecontent?filepath=junit/junit/4.12/junit-4.12.jar
100% [=======================================================================================================================================================================] Time: 0:00:00
09:47:05 INFO: Installing JUnit into /home/alphasense/.bzt/selenium-taurus/tools/junit
09:47:05 INFO: Installed JUnit successfully
09:47:05 INFO: Installing HamcrestJar
100% [=======================================================================================================================================================================] Time: 0:00:00
09:47:07 ERROR: RuntimeError: Javac exited with error:
 error: error reading /home/alphasense/.bzt/selenium-taurus/tools/junit/hamcrest-core.jar; error in opening zip file
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 error
1 warning
09:47:07 INFO: Post-processing...


yaml:
---
modules:
selenium:
selenium-tools:
junit:
path: ~/.bzt/selenium-taurus/tools/junit/junit.jar # path to JUnit framework
selenium-server: ~/.bzt/selenium-taurus/selenium-server.jar # path to Selenium Standalone Server
jar-name: /Users/ybushnev/Documents/workspace/OwnProjects/TaurusTestProject/out/artifacts/Selenium_jar/Selenium.jar
working-dir: classes # set name of runner working directory within artifacts dir
compile-target-java: 1.7 # -source and -target option value for javac

execution:
- executor: selenium
iterations: 5
scenario: complex

scenarios:
complex:
script: ../selenium/DestinationOfTheWeekTests.java

settings:
artifacts-dir: /tmp/taurus-%Y-%m-%d_%H-%M-%S.%fbzt

Andrey Pokhilko

unread,
Aug 30, 2016, 3:09:34 AM8/30/16
to codenam...@googlegroups.com

This is an issue of hamcrest lib download from outdated location. We've already fixed it for the next release, you can install it from snapshot: http://gettaurus.org/docs/DeveloperGuide/#Python-Egg-Snapshots


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/4728cf97-7ad8-473f-b729-eefaa1051568%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yuri Bushnev

unread,
Aug 30, 2016, 4:26:53 AM8/30/16
to Andrey Pokhilko, codenam...@googlegroups.com
Hello Andrey,

Thank you very much for the clarification and for such quick response! Yes, the last release works fine regarding that issue. Will be glad if you can give a hint on one more.. I have simplified and example.

My test script:
package com.bushnev.selenium;

import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Test2 {
WebDriver driver = new FirefoxDriver();
@Before
public void setup() {
driver.navigate().to("http://google.com");
}
@Test
public void login() throws InterruptedException {
driver.getTitle();
}
}

My yaml:
---

execution:
- executor: selenium
iterations: 5
scenario: complex

scenarios:
complex:
    script: /home/alphasense/Documents/TaurusTestProject/src/test/java/com/bushnev/selenium/Test2.java

modules:
selenium:
selenium-tools:
junit:
jar-name: compiled_jar_from_provided_sources.jar

reporting:
- module: junit-xml

In this case, I'm getting the:

11:19:23 ERROR: RuntimeError: Test runner JUnitTester has failed: Aug 30, 2016 11:19:22 AM taurusjunit.CustomRunner main
INFO: Starting: [/home/alphasense/Documents/TaurusTestProject/src/test/java/com/bushnev/taurus/2016-08-30_11-19-20.261286/customrunner.properties]
Aug 30, 2016 11:19:22 AM taurusjunit.CustomRunner processJAR
INFO: Processing JAR: /home/alphasense/Documents/TaurusTestProject/src/test/java/com/bushnev/taurus/2016-08-30_11-19-20.261286/classes/compiled_jar_from_provided_sources.jar
Exception in thread "main" java.lang.NoClassDefFoundError: Test2 (wrong name: com/bushnev/selenium/Test2)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)



The obvious solution is to remove package specification at the top of the script file. In this case everything compiles and works. But it is not a correct solution of course. I also tried to put compiled jar file of my project under 'additional classpath section, don't work.


Thanks,
Iurii.




To unsubscribe from this group and stop receiving emails from it, send an email to codename-taurus+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "codename-taurus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codename-taurus/bezGA6r71GY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codename-taurus+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/da22f83b-c509-3651-07e4-c650022e0e5e%40blazemeter.com.

Andrey Pokhilko

unread,
Aug 30, 2016, 4:30:19 AM8/30/16
to codenam...@googlegroups.com

Just don't change "selenium-tools" setting, this is for internal Taurus functioning.

Looks like if you will remove whole "modules" block in your config, it will work then.


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

Yuri Bushnev

unread,
Aug 30, 2016, 4:38:32 AM8/30/16
to Andrey Pokhilko, codenam...@googlegroups.com
It seems that it uses the same values for defaults. At least nothing have changed after removing of that section.
I wondering about this result compiled jar. Shouldn't the Test2.java be placed under com/bushnev/selenium/Test2.class in this case in that compiled jar?

Screenshots in attachment.

 

Screenshot from 2016-08-30 11:34:59.png
Screenshot from 2016-08-30 11:34:35.png
Screenshot from 2016-08-30 11:38:23.png

Andrey Pokhilko

unread,
Aug 30, 2016, 4:49:45 AM8/30/16
to Yuri Bushnev, codenam...@googlegroups.com

Since you have specified "package" but pointed "script" onto specific file, you got JAR with not what you expect.

Either remove "package" in your Java file or point "script" onto sources root (/home/alphasense/Documents/TaurusTestProject/src/test/java in your case).


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

Yuri Bushnev

unread,
Aug 30, 2016, 6:56:04 AM8/30/16
to Andrey Pokhilko, codenam...@googlegroups.com
So, I guess there is no way no run junit selenium tests which have some dependencies on another classes? Let me check if I understood you correct.
The second options seems doesn't work, as in this case how we can specify which exactly classes to run?

As for first one, If I specify the exact script location
scenarios:
complex:
script: /home/alphasense/Documents/TaurusTestProject/src/test/java/taurus/Test4.java
then in compiled jar I will have only this class. And what if I have some imports inside like "import com.bushnev.frameowrk....'....
import com.bushnev.framework.BasePage;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Test4{

@Test
public void login() throws InterruptedException {
        BasePage basePage = new BasePage();

System.setProperty("webdriver.chrome.driver", "/home/alphasense/Documents/chromedriver");
WebDriver driver = new ChromeDriver();

driver.get("http://google.com");
driver.getTitle();
driver.close();

}
}
..then this script will fail with reasonable error:

/tmp/taurus-2016-08-30_13-43-10.298995bzt/classes/Test4.java:1: error: package com.bushnev.framework does not exist
import com.bushnev.framework.BasePage;

But, I guess that in this case I can specify this param with compiled sources of my project:
additional-classpath:  # optional, following libs will be added to java classpath
- /home/alphasense/Documents/TaurusTestProject/out/artifacts/Selenium_jar/Selenium.jar
And yes, I don't have any previous error right now, but test failed without any error entry in bzt logs. Failed on that line:
 BasePage basePage = new BasePage();
And I can understand that the reason on this line only because if I put it at the end, all other steps work fine while the request status in Taurus is still failed. If I put it at the begging, the script failed without execution of other steps and if I remove that line, then it works fine.

In the same time, simple script execution without taurus works fine.



Sorry that it is not clear for me, but I want to present this tool in my company as a solution to reuse some existing scripts. These scripts as usual have different dependencies on other classes and I'm looking for any kind of example how I can run i using junit executor and Taurus.

I am very grateful for your help.

Thanks,
Iurii.








bzt.log

Yuri Bushnev

unread,
Aug 30, 2016, 7:02:12 AM8/30/16
to Andrey Pokhilko, codenam...@googlegroups.com
Okay, I have found the one in junit.err:

Aug 30, 2016 2:01:35 PM taurusjunit.CustomListener testFailure
SEVERE: failed login(Test4): Invalid signature file digest for Manifest main attributes

Not clear for me yet, but will try to find the reason.

Thanks,
Iurii.

Andrey Pokhilko

unread,
Aug 30, 2016, 7:23:11 AM8/30/16
to codenam...@googlegroups.com

Ppoint "script" onto sources root /home/alphasense/Documents/TaurusTestProject/src/test/java , this is the thing that will fix classpath searching for you.


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

Yuri Bushnev

unread,
Aug 30, 2016, 8:03:04 AM8/30/16
to Andrey Pokhilko, codenam...@googlegroups.com
Okay, if I just point it to /home/alphasense/Documents/TaurusTestProject/src/test/java then it will be running only scripts which are located into that directory ignoring all other directories inside it (if I have one in that location). Should I place all scripts into /home/alphasense/Documents/TaurusTestProject/src/test/java then? Because it seems like not clear way to put all existing test scripts in root folder.

And how in this case I can specify which script to run exactly for my scenario?

Or maybe I didn't catch what do you mean by "point script onto sources"?

I thought it is
scenarios:
complex:
script: /home/alphasense/Documents/TaurusTestProject/src/test/java
instead of
scenarios:
complex:
script: /home/alphasense/Documents/TaurusTestProject/src/test/java/taurus/Test4.java


And by the way, I was able to run script by specifying full path and adding compiled project jar into additional-clathpath. But only if I remove package specification in my test script which gives me different sort of warnings.
How do you think, maybe it is better to put test script into compiled.jar in exactly the same package as specified in test script file? if there is no package then in root. If there is, then put exactly to the same package.

I think in the case it will be possible to run any test script from any location in the same way as I do. Not sure if it is correct way, but the only one which I have found to run specific script file which has packages and dependencies.

Thanks,
Iurii.


Thanks,
Iurii.

--
You received this message because you are subscribed to a topic in the Google Groups "codename-taurus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codename-taurus/bezGA6r71GY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codename-taurus+unsubscribe@googlegroups.com.

Andrey Pokhilko

unread,
Aug 30, 2016, 8:18:39 AM8/30/16
to Yuri Bushnev, codenam...@googlegroups.com

I think you got it right with additional-classpath


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

Yuri Bushnev

unread,
Aug 30, 2016, 8:24:37 AM8/30/16
to Andrey Pokhilko, codenam...@googlegroups.com
Correct. But one issue is still there. It doesn't work in case of any specified package while all java classes usually placed in non default packages.

But anyway, thank you very much for your help.

Yuri Bushnev

unread,
Sep 4, 2016, 5:01:07 AM9/4/16
to Andrey Pokhilko, codenam...@googlegroups.com
Hello Andrey,

Unfortunately, it seems that specifying 'additional-classpath' doesn't look as great solution for automation because it is not possible to specify it with relative path (only full path can be used => doesn't work well for automation).

That's why I decided to go with your second option: point script to java source root. But it seems it doesn't work also. If I will put my code as: 

-src
--main
---java
----[automation framework classes]
--test
---java
----[junit tests]

and point script to /home/alphasense/Documents/TaurusTestProject/src/test/java in this case I get compilation error :

Inline image 1

and I even don't seen compiled.jar in result folder.


But if I put my code like: 

-src
--main
---java
----[nothing]
--test
---java
----[automation framework classes]
----[junit tests]

Inline image 2

and point script to /home/alphasense/Documents/TaurusTestProject/src/test/java in this case I don't get compilation error, I see the compiled.jar but there is still no other classes inside and Taurus failed during execution. And only in junit.err I can find:

Exception in thread "main" java.lang.NoClassDefFoundError: framework/BaseTest

Inline image 3

In this same time I can easily run tests using junit or maven.

Will be very glad for any hints on this.

Andrey Pokhilko

unread,
Sep 4, 2016, 5:05:23 AM9/4/16
to Yuri Bushnev, codenam...@googlegroups.com

Can you put your code into GitHub repository, so we'll be able to take it and reproduce your issues?


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

Yuri Bushnev

unread,
Sep 4, 2016, 6:03:52 AM9/4/16
to Andrey Pokhilko, codenam...@googlegroups.com
Thank you for the quick response. I have simplified the project just to save your time and to show the general idea of my issue.

https://github.com/BushnevYuri/TaurusSImpleTestProject

I have test:
TaurusSImpleTestProject/src/test/java/selenium/JunitBaseTest.java

Which has dependency on:
Taurus/TaurusSImpleTestProject/src/main/java/framework/BaseTestClassForBaseJunitTest.java

The main idea that I want to run some specified test without specifying full path on project jar file in 'additional-classpath' (as it is not possible to do in fully automation way in continuous integration) like in:
TaurusSImpleTestProject/src/test/java/taurus/TaurusScriptV1.yml file.

If it is not possible to do in any ways and only one possible solution is to run only all tests but pointing script to source directory (I guess that in this case we can not specify tests at all) then it should be like in:
TaurusSImpleTestProject/src/test/java/taurus/TaurusScriptV2.yml.
Unfortunately it is also not the great option as we can not specify which tests and how to run. But at least it will be working for CI automation. But for now both options don't work for me without specifying 'aditional-classpath'.

Inline image 2





Andrey Pokhilko

unread,
Sep 4, 2016, 7:47:24 AM9/4/16
to codenam...@googlegroups.com

Thanks! That helped to locate the issue. I have created PR to fix it: https://github.com/Blazemeter/taurus/pull/323

First thing, you should have base classes for your tests inside "test" directory, since they belong to test and not to main project code. Selenium testing projects usually have no "main" code, only "test".

Second thing, move taurus config out of "java", as they are not part of Java source code.

Here's how my working configuration looks like (assuming PR is applied):


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

Yuri Bushnev

unread,
Sep 4, 2016, 8:33:18 AM9/4/16
to Andrey Pokhilko, codenam...@googlegroups.com
Great! Thanks for the PR and clarification. 

As for tests related code.. Quite often (all of 6 projects where I was working) there are separate QA Automation projects which contain code related only to testing activities (for Backend, DB, Selenium or Performance testing). In this case all code which is related to this QA Automation framework itself is always located in the main java section:
- Helpers
- DAO for db testing
- Page object for selenium
- Different models and so on
- and many others things...
while tests itself are located under java/test.

And I think almost all QA Automation engineers go with this pattern. And I believe that even programmers very often use different models and other code from the main project part to avoid duplication.

That's why I'm just wondering is it possible to implement some workaround as improvement for it in some future versions? I'm sure that it will be critical for many framework users who want to go with selenium tests execution via Taurus.

  

Andrey Pokhilko

unread,
Sep 4, 2016, 10:25:16 AM9/4/16
to Yuri Bushnev, codenam...@googlegroups.com

From what you say, I assume that all these additional classes are most likely in some JAR, regardless of who has created them, maven build for example. So these JARs are meant to be included into "additional-classpath". With proper bzt launch directory, relative paths to these JARs would work fine.

I personally prefer to launch everything from maven project root and rely on "target" directory as  relative path.


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

Yuri Bushnev

unread,
Sep 6, 2016, 3:30:59 PM9/6/16
to Andrey Pokhilko, codenam...@googlegroups.com
Actually no, I meant that almost all the time, we have to use classes from the main section into the test section. And it is not related to additional dependencies like from maven or some  jars.. I mean only own code. 
I can say that usually QA automation projects have the same pattern: page Object classes, db DAO's for testing and all other project testing stuff (not tests itself) located into the main section. 
And as for not QA Automation.. I think it is a common case when we have for example one Enum entity which is located into the main section. In this case why we need to create the same Enum into the test section? For sure we want to reuse it in both places.

And I had a discussion with 2 other engineers who are trying to use Taurus with selenium and they also have the same concern about that. 

Sorry if I didn't get your point, but for my point of view it is pretty critical for framework usage.

And as for PR.. Based on the merge history, I thought that it is already included into the last version: (bzt-1.6.8.874.tar.gz, Sep 06, 2016) but to tell the truth, the last build still has this issue for even when I changed everything in the way you mentioned above.
  • yaml is moved out from java
  • script pointed to java folder
  • all other classes moved to test section (really want to try it on simple test project, but don't see how I can go ahead with it in the main project yet)
Screen Shot 2016-09-06 at 21.58.53.jpg
Screen Shot 2016-09-06 at 22.01.41.jpg

Yuri Bushnev

unread,
Sep 6, 2016, 4:07:09 PM9/6/16
to Andrey Pokhilko, codenam...@googlegroups.com
Also we mentioned that relative path should work fine in case of proper bzt launch location. I was trying to do very diligently but still not luck( Maybe you have an idea based on the screenshot? I think I could go ahead with this approach in case if additional-classpath will contain relative path.

Inline image 1

Andrey Pokhilko

unread,
Sep 6, 2016, 11:44:10 PM9/6/16
to Yuri Bushnev, codenam...@googlegroups.com

Hi,

This fix will be part of version 1.6.9. If you see PR merged then latest
developer snapshot will contain the fix.

I tried to make a working example from your code and located one more
issue. Created next PR to fix the issue:
https://github.com/Blazemeter/taurus/pull/325

In the PR, I've also added correct project into examples directory. You
can review it on the PR page or wait for merge to happen.

Thanks for your help!


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
On 09/06/2016 10:27 PM, Yuri Bushnev wrote:
Actually no, I meant that almost all the time, we have to use classes from the main section into the test section. And it is not related to additional dependencies like from maven or some  jars.. I mean only own code. 
I can say that usually QA automation projects have the same pattern: page Object classes, db DAO's for testing and all other project testing stuff (not tests itself) located into the main section. 
And as for not QA Automation.. I think it is a common case when we have for example one Enum entity which is located into the main section. In this case why we need to create the same Enum into the test section? For sure we want to reuse it in both places.

And I had a discussion with 2 other engineers who are trying to use Taurus with selenium and they also have the same concern about that. 

Sorry if I didn't get your point, but for my point of view it is pretty critical for framework usage.

And as for PR.. Based on the merge history, I thought that it is already included into the last version: (bzt-1.6.8.874.tar.gz, Sep 06, 2016) but to tell the truth, the last build still has this issue for even when I changed everything in the way you mentioned above.
  • yaml is moved out from java
  • script pointed to java folder
  • all other classes moved to test section (really want to try it on simple test project, but don't see how I can go ahead with it in the main project yet)



 

From what you say, I assume that all these additional classes are most likely in some JAR, regardless of who has created them, maven build for example. So these JARs are meant to be included into "additional-classpath". With proper bzt launch directory, relative paths to these JARs would work fine.

I personally prefer to launch everything from maven project root and rely on "target" directory as  relative path.


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
On 09/04/2016 03:33 PM, Yuri Bushnev wrote:
Great! Thanks for the PR and clarification. 

As for tests related code.. Quite often (all of 6 projects where I was working) there are separate QA Automation projects which contain code related only to testing activities (for Backend, DB, Selenium or Performance testing). In this case all code which is related to this QA Automation framework itself is always located in the main java section:
- Helpers
- DAO for db testing
- Page object for selenium
- Different models and so on
- and many others things...
while tests itself are located under java/test.

And I think almost all QA Automation engineers go with this pattern. And I believe that even programmers very often use different models and other code from the main project part to avoid duplication.

That's why I'm just wondering is it possible to implement some workaround as improvement for it in some future versions? I'm sure that it will be critical for many framework users who want to go with selenium tests execution via Taurus.

  
On Sun, Sep 4, 2016 at 2:47 PM, Andrey Pokhilko <and...@blazemeter.com> wrote:

Thanks! That helped to locate the issue. I have created PR to fix it: https://github.com/Blazemeter/taurus/pull/323

First thing, you should have base classes for your tests inside "test" directory, since they belong to test and not to main project code. Selenium testing projects usually have no "main" code, only "test".

Second thing, move taurus config out of "java", as they are not part of Java source code.

Here's how my working configuration looks like (assuming PR is applied):


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
On 09/04/2016 01:03 PM, Yuri Bushnev wrote:
Thank you for the quick response. I have simplified the project just to save your time and to show the general idea of my issue.

https://github.com/BushnevYuri/TaurusSImpleTestProject

I have test:
TaurusSImpleTestProject/src/test/java/selenium/JunitBaseTest.java

Which has dependency on:
Taurus/TaurusSImpleTestProject/src/main/java/framework/BaseTestClassForBaseJunitTest.java

The main idea that I want to run some specified test without specifying full path on project jar file in 'additional-classpath' (as it is not possible to do in fully automation way in continuous integration) like in:
TaurusSImpleTestProject/src/test/java/taurus/TaurusScriptV1.yml file.

If it is not possible to do in any ways and only one possible solution is to run only all tests but pointing script to source directory (I guess that in this case we can not specify tests at all) then it should be like in:
TaurusSImpleTestProject/src/test/java/taurus/TaurusScriptV2.yml.
Unfortunately it is also not the great option as we can not specify which tests and how to run. But at least it will be working for CI automation. But for now both options don't work for me without specifying 'aditional-classpath'.







On Sun, Sep 4, 2016 at 12:05 PM, Andrey Pokhilko <and...@blazemeter.com> wrote:

Can you put your code into GitHub repository, so we'll be able to take it and reproduce your issues?


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
On 09/04/2016 12:01 PM, Yuri Bushnev wrote:
Hello Andrey,

Unfortunately, it seems that specifying 'additional-classpath' doesn't look as great solution for automation because it is not possible to specify it with relative path (only full path can be used => doesn't work well for automation).

That's why I decided to go with your second option: point script to java source root. But it seems it doesn't work also. If I will put my code as: 

-src
--main
---java
----[automation framework classes]
--test
---java
----[junit tests]

and point script to /home/alphasense/Documents/TaurusTestProject/src/test/java in this case I get compilation error :



and I even don't seen compiled.jar in result folder.


But if I put my code like: 

-src
--main
---java
----[nothing]
--test
---java
----[automation framework classes]
----[junit tests]



and point script to /home/alphasense/Documents/TaurusTestProject/src/test/java in this case I don't get compilation error, I see the compiled.jar but there is still no other classes inside and Taurus failed during execution. And only in junit.err I can find:

Exception in thread "main" java.lang.NoClassDefFoundError: framework/BaseTest



Yuri Bushnev

unread,
Sep 9, 2016, 8:56:55 AM9/9/16
to Andrey Pokhilko, codenam...@googlegroups.com
Hello Andrey.

Just one more question. Or probably suggestion.. I guess you already thought about it. Is it possible to provide 'additional-classpath' for all scenarios in one time? 
For now Taurus yaml file should contain lots of duplication, as usually each scenario requires the same dependencies. I just wondering how difficult it will be to add 'additional-classpath' on general 'scenarios' level in addition to each scenario.

Not it looks like this:
scenarios:
some-scenario-1:
script: src/test/java/selenium/Test1.java
additional-classpath:
- /Users/ybushnev/Documents/workspace/OwnProjects/TaurusTestProject/out/artifacts/TaurusTestProject/TaurusTestProject.jar
some-sceanrio-2:
script: src/test/java/selenium/Test2.java
additional-classpath:
- /Users/ybushnev/Documents/workspace/OwnProjects/TaurusTestProject/out/artifacts/TaurusTestProject/TaurusTestProject.jar
some-scenario-3:
script: src/test/java/selenium/Test3.java
additional-classpath:
- /Users/ybushnev/Documents/workspace/OwnProjects/TaurusTestProject/out/artifacts/TaurusTestProject/TaurusTestProject.jar
.....
Will it be difficult to support it also in this way? While specifying this param on top level makes it available for whole scenarios in batch:

scenarios:
  additional-classpath:
- /Users/ybushnev/Documents/workspace/OwnProjects/TaurusTestProject/out/artifacts/TaurusTestProject/TaurusTestProject.jar
some-scenario-1:
script: src/test/java/selenium/Test1.java
some-sceanrio-2:
script: src/test/java/selenium/Test2.java
some-scenario-3:
script: src/test/java/selenium/Test3.java
.....
Thanks,
Yuri.

stanislav...@gmail.com

unread,
Oct 7, 2016, 4:24:20 AM10/7/16
to codename-taurus, and...@blazemeter.com, ybus...@alpha-sense.com
UP! need same answer!

regards,
Yuri.


Thanks,
Iurii.
-- You received this message because you are subscribed to a topic in the Google Groups "codename-taurus" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/codename-taurus/bezGA6r71GY/unsubscribe. To unsubscribe from this group and all its topics, send an email to codename-taur...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/1995a2a7-068a-bcdf-12b1-a4fe75a3973e%40blazemeter.com.
For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to a topic in the Google Groups "codename-taurus" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/codename-taurus/bezGA6r71GY/unsubscribe. To unsubscribe from this group and all its topics, send an email to codename-taur...@googlegroups.com.

Andrey Pokhilko

unread,
Oct 7, 2016, 4:26:20 AM10/7/16
to codenam...@googlegroups.com

Okay, we'll add global additional-classpath in the 1.7.1. It will be set on this level:

---

modules:

  selenium:

    additional-classpath: ...


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
-- You received this message because you are subscribed to the Google Groups "codename-taurus" group. To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/02dd2d0e-641c-4e19-9fe9-1178b99a8a7b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

stanislav...@gmail.com

unread,
Oct 14, 2016, 8:57:26 AM10/14/16
to codename-taurus, ybus...@alpha-sense.com
Hi,

Still waiting for this fix, when the resolved will be available?

regards,
Thanks,
Iurii.
-- You received this message because you are subscribed to a topic in the Google Groups "codename-taurus" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/codename-taurus/bezGA6r71GY/unsubscribe. To unsubscribe from this group and all its topics, send an email to codename-taur...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/1995a2a7-068a-bcdf-12b1-a4fe75a3973e%40blazemeter.com.
For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to a topic in the Google Groups "codename-taurus" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/codename-taurus/bezGA6r71GY/unsubscribe. To unsubscribe from this group and all its topics, send an email to codename-taur...@googlegroups.com.

Andrey Pokhilko

unread,
Oct 14, 2016, 8:58:30 AM10/14/16
to codenam...@googlegroups.com

That fix was already released, try upgrading to latest version (1.7.2)


Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.
-- You received this message because you are subscribed to the Google Groups "codename-taurus" group. To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/3af16e65-162d-4f43-a35e-1d545cf7421e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages