On Sun, Sep 13, 2015 at 11:50 AM, Kanstantsin Shautsou
<kanstantsin....@gmail.com> wrote:
> Seems that existed ATH code can be extended for creating channel, that can
> support automatic classloading and tests execution on remote side.
> The idea is to programmatically prepare complex environment (my test code)

I guess you mean you want Java test code (`src/test/java/`) which
links against core/plugin types, but which ought to be loaded not by
the Java application class loader, but by a loader inside the remote
Jenkins JVM.

http://hg.netbeans.org/main-silver/file/a976d656a742/nbjunit/src/org/netbeans/junit/NbModuleSuite.java#l819

is an example (in the NetBeans functional test system), though it
would be more applicable to adding this feature to `JenkinsRule` (if
we wanted it to use a more realistic class loading scheme).

> run remote JenkinsController (existed ATH), get channel connection to it
> (add such feature in ATH), call Junit test execution on channel

I suspect you would need to add a custom support plugin to the Jenkins
server (see, e.g., `LocalController` and `RemoteJenkinsProvider` which
add `form-element-path`) which would add a `AgentProtocol` that would
use `ChannelBuilder` to set up a remoting channel (see
`JnlpSlaveAgentProtocol` for an example) that trusts the client to
send class files (your test code) to the master, loading them in a new
`ClassLoader` based on `uberClassLoader` (cf. `GroovyshCommand`).

All should be possible, but difficult code to write—you will need to
know Remoting pretty intimately.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0hAUZaO%3DgpQ2US7tNPSXZV7T2z89-Uj6Md70gC-EvvYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to