Login | Register
My pages Projects Community openCollabNet

Discussions > users > RE: [maxq-users] Why Jython 1.1 instead of 2.0 or 2.1 ?

maxq
Discussion topic

Hide all messages in topic

All messages in topic

Re: [maxq-users] Why Jython 1.1 instead of 2.0 or 2.1 ?

Author oliverbock
Full name Oliver Bock
Date 2005-01-14 23:15:09 PST
Message >> MaxQ ships with Jython 2.1, which is the latest.
>
> I went back to try to find what made me think it was 1.1, (the
> jython.jar
> doesn't actually say, inside or outside - it only contains the class
> files).
> The file max-0.98/LICENSE_JYTHON refers to version 1.1.x, and that is
> why I
> thought that the max-0.98/lib/jython.jar file was also 1.1. So, at
> the
> very least, the license file should be updated to match the version of
> Jython that is included.

The license file distributed with MaxQ essentially matches the Jython
2.1 license file (some history was omitted). I think the "1.1" bit
refers to JPython, which is somehow part of Jython's history.


    Oliver


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@ma​xq.tigris.org
For additional commands, e-mail: users-help at maxq dot tigris dot org

RE: [maxq-users] Why Jython 1.1 instead of 2.0 or 2.1 ?

Author timothyjones
Full name Timothy Jones
Date 2005-01-14 14:54:55 PST
Message > MaxQ relies on JTidy to validate response output. Another approach is
> to use HTTPUnit for APIs to do validations on the response. HTTPUnit is
> an open-source library written in 100% Java. You can use the Jython
> import commands to access HTTPUnit's classes and methods.

Thanks for the pointer to Jtidy! I wasn't looking to do HTML validation as
a part of this. Rather, I want to do more application specific things, like
making sure that logging in as 'User A' provides access to User A's
company's data, and that User B gets an entirely different set of data to
browse. But thanks to you, I looked up HTML Tidy (the non-Java one), found
it already on my Debian box packaged as "tidy-proxy", which embeds a
validation report at the top of every page. That's going to be a new
favorite of mine!

> MaxQ ships with Jython 2.1, which is the latest.

I went back to try to find what made me think it was 1.1, (the jython.jar
doesn't actually say, inside or outside - it only contains the class files).
The file max-0.98/LICENSE_JYTHON refers to version 1.1.x, and that is why I
thought that the max-0.98/lib/jython.jar file was also 1.1. So, at the
very least, the license file should be updated to match the version of
Jython that is included.

> Hope this helps.

It does. Thank you for being on the list!




tlj

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@ma​xq.tigris.org
For additional commands, e-mail: users-help at maxq dot tigris dot org

Re: [maxq-users] Why Jython 1.1 instead of 2.0 or 2.1 ?

Author fcohen
Full name Frank Cohen
Date 2005-01-14 13:44:25 PST
Message Hi Timothy: Welcome to the MaxQ user's community.

> I am looking at MaxQ for building a regression test suite against a
> webapp
> here at work. I love how it created the Jython script simply by
> making me
> go through it's proxy server. Having the output of this tool be yet
> another
> program seems like a very rewarding move. The particular benefit I am
> looking for is to able to do extremely detailed validations on the
> response
> body output.

MaxQ relies on JTidy to validate response output. Another approach is
to use HTTPUnit for APIs to do validations on the response. HTTPUnit is
an open-source library written in 100% Java. You can use the Jython
import commands to access HTTPUnit's classes and methods.


> I figured a good first baby step would be to add some code to the
> generated
> Jython scripts so that they save certain response bodies to disk as
> separate
> files, then point a Konqueror or Mozilla window to that output file
> (so I
> can see the output as it happens). I am not terribly familiar with
> Python
> (yet), but quickly found the calls for opening/writing/closing files,
> and
> tested them with the real Python interpreter (at this point I thought
> Jython
> was just an interface to regular Python. I now realize that Jython is
> a
> partial re-implementation of Python, missing a lot of pieces). So
> when I
> tried to do the same thing in Jython, I ran into problems (the open()
> call
> couldn't be found).
>

Jython 2.1 is an implementation of Python 2.1. There are a number of
Python modules that use native commands that are not available to
Jython. However, Jython more than compensates by making any Java class
available and Java is much further ahead than Python in terms of
functionality and APIs.

For learning Jython I recommend any of the Jython books (Jython
Essentials from O'Rielly, Jython for Java Programmers from New Riders.)
I find myself often going back to The Python Quickstart from Peachpit
Press to help me remember the file commands and how to work with
dictionaries and the like.


> After finding that Jython 1.1 doesn't seem to implement the built-in
> Python
> open/close routines (if I'm wrong on this, please correct me!), I
> discovered
> that the Jython project has versions 2.0 and 2.1 available on their
> site.
>
> Before I try the Jython 2.1 (see if the I/O libraries are
> implemented), I
> wanted to ask: Is there some reason that MaxQ 0.98 (released last
> month)
> can't use Jython 2.x? (Jython 1.1 isn't even mentioned on jython.org
> anymore?)
>

MaxQ ships with Jython 2.1, which is the latest.

> Or should I try using the java.io.* libraries from Jython to write the
> files
> from the generated scripts?

In general, I first try to use Python commands and when I can't get
that to work I use a Java class.

Hope this helps.

-Frank


> Thanks,
>
>
>
> Timothy Jones - Sr. Systems Engineer, Development
> (813) 273-4743 - Syniverse Technologies
> Do the Right Thing. It will gratify some people and astound the rest.
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ma​xq.tigris.org
> For additional commands, e-mail: users-help at maxq dot tigris dot org
>
>
---
Frank Cohen, PushToTest, http://www.PushToTest.com, phone: 408 374 7426
Author of "Java Testing and Design: From Unit Tests to Automated Web
Tests"
from Prentice Hall, details at http://thebook.pushtotest.com


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@ma​xq.tigris.org
For additional commands, e-mail: users-help at maxq dot tigris dot org

RE: [maxq-users] Why Jython 1.1 instead of 2.0 or 2.1 ?

Author timothyjones
Full name Timothy Jones
Date 2005-01-14 13:12:32 PST
Message Never mind - one of the python-isms that I'm not used to (yet) is the
indentation actually affecting compilation of code (whitespace doesn't
matter at all in most other languages).

Basically the maxq-generated script file had spaces instead of tabs, and I
used 'vim' to add a little helper function near the top of the file
(containing the open/write/close calls). But this new section was indented
with tabs, being newly-inserted text, and because I didn't expand them to
spaces, the compiler didn't see the file the way I did on the screen.
Clearly I need to get 'vim' to do this for me.

Once I expanded the tabs to spaces, everything started behaving the way I
thought it should! I apologize for chewing up your bandwidth with this
episode. This is a very basic Python-newbie problem I had!

By the way, during the debugging effort of this, I DID try putting jython
2.1 place of the jython 1.1 file that was in maxq-0.98/lib, and it worked
fine. After I realized what my problem was, I put the 1.1 file back in
place, and still everything is fine!



tlj

Timothy Jones - Sr. Systems Engineer, Development
(813) 273-4743 - Syniverse Technologies
Do the Right Thing. It will gratify some people and astound the rest.


-----Original Message-----
From: Timothy Jones [mailto:Timothy.Jone​s@syniverse.com]
Sent: Friday, January 14, 2005 12:58 PM
To: 'users at maxq dot tigris dot org'
Subject: [maxq-users] Why Jython 1.1 instead of 2.0 or 2.1 ?


Good morning, fellow techies!

I am looking at MaxQ for building a regression test suite against a webapp
here at work. I love how it created the Jython script simply by making me
go through it's proxy server. Having the output of this tool be yet another
program seems like a very rewarding move. The particular benefit I am
looking for is to able to do extremely detailed validations on the response
body output.

I figured a good first baby step would be to add some code to the generated
Jython scripts so that they save certain response bodies to disk as separate
files, then point a Konqueror or Mozilla window to that output file (so I
can see the output as it happens). I am not terribly familiar with Python
(yet), but quickly found the calls for opening/writing/closing files, and
tested them with the real Python interpreter (at this point I thought Jython
was just an interface to regular Python. I now realize that Jython is a
partial re-implementation of Python, missing a lot of pieces). So when I
tried to do the same thing in Jython, I ran into problems (the open() call
couldn't be found).

After finding that Jython 1.1 doesn't seem to implement the built-in Python
open/close routines (if I'm wrong on this, please correct me!), I discovered
that the Jython project has versions 2.0 and 2.1 available on their site.

Before I try the Jython 2.1 (see if the I/O libraries are implemented), I
wanted to ask: Is there some reason that MaxQ 0.98 (released last month)
can't use Jython 2.x? (Jython 1.1 isn't even mentioned on jython.org
anymore?)

Or should I try using the java.io.* libraries from Jython to write the files
from the generated scripts?

Thanks,



Timothy Jones - Sr. Systems Engineer, Development
(813) 273-4743 - Syniverse Technologies
Do the Right Thing. It will gratify some people and astound the rest.

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@ma​xq.tigris.org
For additional commands, e-mail: users-help at maxq dot tigris dot org

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@ma​xq.tigris.org
For additional commands, e-mail: users-help at maxq dot tigris dot org

[maxq-users] Why Jython 1.1 instead of 2.0 or 2.1 ?

Author timothyjones
Full name Timothy Jones
Date 2005-01-14 09:57:59 PST
Message Good morning, fellow techies!

I am looking at MaxQ for building a regression test suite against a webapp
here at work. I love how it created the Jython script simply by making me
go through it's proxy server. Having the output of this tool be yet another
program seems like a very rewarding move. The particular benefit I am
looking for is to able to do extremely detailed validations on the response
body output.

I figured a good first baby step would be to add some code to the generated
Jython scripts so that they save certain response bodies to disk as separate
files, then point a Konqueror or Mozilla window to that output file (so I
can see the output as it happens). I am not terribly familiar with Python
(yet), but quickly found the calls for opening/writing/closing files, and
tested them with the real Python interpreter (at this point I thought Jython
was just an interface to regular Python. I now realize that Jython is a
partial re-implementation of Python, missing a lot of pieces). So when I
tried to do the same thing in Jython, I ran into problems (the open() call
couldn't be found).

After finding that Jython 1.1 doesn't seem to implement the built-in Python
open/close routines (if I'm wrong on this, please correct me!), I discovered
that the Jython project has versions 2.0 and 2.1 available on their site.

Before I try the Jython 2.1 (see if the I/O libraries are implemented), I
wanted to ask: Is there some reason that MaxQ 0.98 (released last month)
can't use Jython 2.x? (Jython 1.1 isn't even mentioned on jython.org
anymore?)

Or should I try using the java.io.* libraries from Jython to write the files
from the generated scripts?

Thanks,



Timothy Jones - Sr. Systems Engineer, Development
(813) 273-4743 - Syniverse Technologies
Do the Right Thing. It will gratify some people and astound the rest.

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: users-unsubscribe@ma​xq.tigris.org
For additional commands, e-mail: users-help at maxq dot tigris dot org
Messages per page: