-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jason,

On 12/11/14 12:16 PM, Jason Ricles wrote:
> No no, it goes Website (GUI) ----> ws server ------> external java
> program

Okay, and your unit test is going to test which interaction? From GUI
to ws server, or from ws server (really a servlet) to the external
Java program?

If it were me, I'd be testing whether your servlet can talk to the
external Java program properly and not worry about the fact that it's
being used by a ws server. You can be reasonably sure that calling a
method from Java is going to work... JVMs are pretty reliable these days.

You can always run your unit test so that the external Java program
produces some output that can be tested by the unit test. If it
produces no output, then it's useless to run the external Java
program... right?

- -chris

> On Thu, Dec 11, 2014 at 11:25 AM, Christopher Schultz 
> <ch...@christopherschultz.net> wrote: Jason,
> 
> On 12/11/14 10:03 AM, Jason Ricles wrote:
>>>> To the question, the external program is sending messages to
>>>> the webpage through the websocket server on the page. Where
>>>> as the webpage is the gui and the external java program is
>>>> the guts of the gui which does what you want when a button is
>>>> pressed on the gui.
> 
> Uh... what?
> 
> External program -- ws:// --> "page" --> executes Java program ?
> 
> -chris
> 
>>>> On Thu, Dec 11, 2014 at 9:35 AM, Christopher Schultz 
>>>> <ch...@christopherschultz.net> wrote: Jason,
>>>> 
>>>> On 12/11/14 9:07 AM, Jason Ricles wrote:
>>>>>>> I am currently using tomcat 7.0.57 to host a website
>>>>>>> for the purpose of having a websocket serverdeployed
>>>>>>> with the page for the purpose of communicating between
>>>>>>> an external java program and the webpage.
>>>> 
>>>> The "web page" (i.e. servlet) is running an external Java
>>>> program, or the external Java program is trying to access a
>>>> "web page" (i.e. servlet)?
>>>> 
>>>>>>> I would like to write some unit test to test that the 
>>>>>>> integration between the external java program and the 
>>>>>>> webpage. I have however had trouble finding what is the
>>>>>>> best way to do this (all i could find was on when you
>>>>>>> are using servlets in tomcat).
>>>> 
>>>> In a Java web application server (like Tomcat), everything
>>>> boils down to a servlet in the end (unless a Filter takes
>>>> over, first, and provides a response).
>>>> 
>>>>>>> Would j-unit be able to run test to verify that the 
>>>>>>> integration between the webpage and the external java
>>>>>>> program is implemented correctly, or is j-unit unable
>>>>>>> to test using a tomcat webserver?
>>>> 
>>>> Tomcat's source package includes hundreds of test cases,
>>>> written using junit.
>>>> 
>>>>>>> If it is unable to run test with the tomcat webserver,
>>>>>>> what unit testing tool is able to that is able to run
>>>>>>> on a linux machine?
>>>> 
>>>> Junit works great. Get Tomcat's source package and look under
>>>> the /test directory for .java files. There are lots of them.
>>>> 
>>>> -chris
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>>
>>>>>
>
>>>>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>>>> For additional commands, e-mail:
>>>>> users-h...@tomcat.apache.org
>>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>>
>>>>
>
>>>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>>> For additional commands, e-mail:
>>>> users-h...@tomcat.apache.org
>>>> 
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUidbCAAoJEBzwKT+lPKRYxqEQAK3o428+SWrQtPC2toPJWwbb
yjwNRE1pdpuAQMD+KCCosa7P1C8BiFAsU6n/x2Cw/buAYgeE294mp14gGzL+266c
7rwdZG4MIzaj06dqBtKQvIMzOlBFp1amvljcHdMD82iqP9geHrRTfi9Oh0FIsuur
D1aIueAexlBRayynkESg8jss2jmDE7RwDzc10077xxHavZjNKFvq17SH8c2cmTPH
6bIDeW72OxmGUxHrcNTGIvN018PlDoZPe+pi1IlBLJkPdviXeDbZkvmP9VP2gS4a
7LvIrKSRaTA2uurIEiBBcYnVARyLnGhZD2rC960iwsY5SW+ZIivVRabXE8DxsBMs
ZMk+mBjYxwTk/aIa1ljOrXwmDUaAjUWbo8C8rQinKW2CYuNUTaNkqSWWQ+QNA8pH
ELyb039gtfhn7vKeZ9aCWFcTjkPPR01SyMtzT65eaxZshwi80ZNYNNxciACV9f4f
Yfrsp4ZaLSn0zeau4UspLX5PR+bW/wuyn9Cex9XVncpE367fBIMM9jYsnSdMR3uD
ON6Bco/WPFlcVbATQxaEz1N1GKUfpQJTCLw3XQeZZwtfYKaCbGtgHD2J606Tm0kU
GCvBgavbHUF+H9acgjvfSVvlC6bGcvagpBrFdmMaUW/+8bRx7P/0xigiDoK2g/kF
Jaeyl5Kj6jOyWPCQUXf1
=KKTg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to