balunasj
:
nbelaevski: I was looking at some the changes you made to the jsf 2.0 integration page
[
09:58am
]
balunasj
:
one seemed weird to me
[
09:58am
]
nbelaevski
:
balunasj: which one?
[
09:58am
]
abelevich joined the chat room.
[
09:58am
]
balunasj
:
# Process EL-expressions in JavaScript files. Implemented in JSF itself
[
09:58am
]
abelevich
:
hi
[
09:58am
]
balunasj
:
abelevich: hi
[
09:59am
]
balunasj
:
nbelaevski: I don't remember seeing anything on EL in javascript
[
09:59am
]
nbelaevski
:
    private boolean isEvaluateExpressions() {
[
09:59am
]
nbelaevski
:
        String contentType = getContentType();
[
09:59am
]
nbelaevski
:
        return ("text/css".equals(contentType)
[
09:59am
]
nbelaevski
:
                || "text/javascript".equals(contentType)
[
09:59am
]
nbelaevski
:
                || "application/x-javascript".equals(contentType));
[
09:59am
]
nbelaevski
:
    }
[
10:00am
]
nbelaevski
:
com.sun.faces.application.resource.ResourceImpl.isEvaluateExpressions()
[
10:01am
]
balunasj
:
nbelaevski: is that support based on the spec, or something mojarra added?
[
10:01am
]
nbelaevski
:
let me check....
[
10:02am
]
•
balunasj
 
looking at ResourceImpl
[
10:02am
]
pmuir
:
balunasj: iirc it is spec supported
[
10:03am
]
balunasj
:
pmuir: cool - I just don't remember seeing it.  So this includes CSS too so that should help with skinning
[
10:04am
]
balunasj
:
ok so lets get started - Stan Silvert has joined us to talk about JSFUnit and the test framework discussions
[
10:04am
]
nbelaevski
:
balunasj: the problem with CSS is that resource URI stays the same for different skins
[
10:05am
]
balunasj
:
nbelaevski: I'm missing where that would effect el processing?
[
10:05am
]
alexsmirnov
:
Hi all!
[
10:05am
]
balunasj
:
alexsmirnov: Hi alexsmirnov
[
10:05am
]
nbelaevski
:
balunasj: i meant to say EL support is not the only thing for skinning
[
10:06am
]
balunasj
:
nbelaevski: ah I see
[
10:06am
]
balunasj
:
Lets talk about the testing items first since ssilvert has joined us
[
10:07am
]
balunasj
:
So the question is where does JSFUnit fit in with these other test projects, should they combine?  Are they separate in their own right? etc...
[
10:07am
]
balunasj
:
It might be good to start with alexsmirnov and discuss his goals for the jsf-test project
[
10:07am
]
balunasj
:
here is the link http://www.jboss.org/community/wiki/TestDrivenJSFDevelopment
[
10:08am
]
pmuir_ joined the chat room.
[
10:08am
]
alexsmirnov
:
The JSFUnit is fine for integration tests. But, because it rubs inside real server, these tests takes a lot of time.
[
10:09am
]
ssilvert
:
You eat the cost of starting the server the first time.
[
10:10am
]
ssilvert
:
Even that will improve with JBoss Embedded.
[
10:10am
]
alexsmirnov
:
RichFaces test project lets testing components with real JSF library, but using stub container. It's fine to test small parts of code, but it is slow too.
[
10:10am
]
alexsmirnov
:
Mock objects are best for unit-tests.
[
10:10am
]
balunasj
:
alexsmirnov: the new project you are describing
[
10:10am
]
balunasj
:
alexsmirnov: is slow too?
[
10:11am
]
ssilvert
:
JBoss Embedded?  It should be fast.  We're discussing it this week.
[
10:11am
]
ssilvert
:
It's not ready yet.
[
10:11am
]
balunasj
:
ssilvert: timeframe?
[
10:12am
]
alexsmirnov
:
ssilvert: really, server should start and stop for each test. Otherwise it eliminated unit tests idea.
[
10:12am
]
ssilvert
:
Why should server start and stop for each test?
[
10:13am
]
alexsmirnov
:
Nick start writing unit test using richfaces server. They are taking a lot of time because JSF framework starts and stops for each test
[
10:14am
]
ssilvert
:
alexsmirnov: I don't see why you need to start/stop for each test.
[
10:14am
]
alexsmirnov
:
ssilver: You should be sure about tests independency. It is important.
[
10:15am
]
ssilvert
:
How does start/stop make your test independent?  all you need to do is start a new session.
[
10:15am
]
alexsmirnov
:
for in-server test you have to at least redeploy web application for each test.
[
10:16am
]
balunasj
:
alexsmirnov: I see stans point when talking about RichFaces testing
[
10:16am
]
balunasj
:
alexsmirnov: If we were testing the JSF impl I see good reason to start/stop
[
10:16am
]
alexsmirnov
:
Because, for example, Mojarra implementation keeps a lot of objects in the application scope.
[
10:16am
]
balunasj
:
alexsmirnov: that being said I think having a way for unit tests to be executed very quicky during development builds is important.
[
10:16am
]
ssilvert
:
I could add a feature to JSFUnit that clears application scope.
[
10:17am
]
ssilvert
:
Or resets application scope to whatever state you want.
[
10:18am
]
balunasj
:
ssilvert: This is where the idea I mentioned in person comes in.  Is there a way to have both in-container and out-of-container testing.  One uses something like mock object, and the other actual deploys.
[
10:18am
]
alexsmirnov
:
ssilvert: but what about static fields an singleton objects ?
[
10:18am
]
balunasj
:
pmuir: This is similar to what you said the jboss-test-harness does iirc.
[
10:18am
]
ssilvert
:
alexsmirnov: What's the problem with that?
[
10:19am
]
ssilvert
:
alexsmirnov: I could remake the object
[
10:19am
]
alexsmirnov
:
balunasj: sure, we need all of them to test different aspects. All these projects not a competitors, bud have a different purposes.
[
10:20am
]
ssilvert
:
I'm interested in this requirement to reset application scope.  Nobody has asked for that.
[
10:20am
]
balunasj
:
alexsmirnov: That was why I suggested starting with a description from you about you goals for this project
[
10:20am
]
ssilvert
:
But if you really need it, I think it is doable.
[
10:21am
]
pmuir left the chat room. (Read error: 110 (Connection timed out))
[
10:22am
]
balunasj
:
ssilvert: if you do that you may need to "redeploy" the application in the test app
[
10:22am
]
pmuir_
:
what i did with the jboss test harness project was allow you to execute the same test either using mocks (for a quick smoke test, run say 60% of your tests that can run with mocks) and then run all the tests in container for the whole test suite
[
10:22am
]
balunasj
:
ssilvert: to get everything resetup - still faster that stop/start - but something to consider
[
10:23am
]
balunasj
:
pmuir_: I really liked you "use case" break down for this
[
10:23am
]
pmuir_ is now known as pmuir.
[
10:23am
]
alexsmirnov
:
ssilvert: Application scope is only one concern. You could not be sure about tests independency without redeployment. For example, many libraries ( and richfaces as well ) has 'lazy' initialization parts.
[
10:23am
]
balunasj
:
* ) smoke/mock - tests for development time
[
10:24am
]
balunasj
:
* ) in container testing (JSFunit) - for commit time
[
10:24am
]
alexsmirnov
:
balunas: sure, they should cover single methods or small objects.
[
10:24am
]
balunasj
:
* ) end-to-end (selenium) test - nightly/release testing
[
10:24am
]
alexsmirnov
:
I'm late
[
10:25am
]
balunasj
:
forgot one
[
10:25am
]
pmuir
:
yeah
[
10:25am
]
balunasj
:
* ) basic unit tests - standard bean logic testing
[
10:25am
]
pmuir
:
how about we take a step back a minute
[
10:25am
]
pmuir
:
how many tests does each component have?
[
10:25am
]
pmuir
:
an average component
[
10:26am
]
alexsmirnov
:
Really, that is very different, depends of component complexity and developer.
[
10:27am
]
balunasj
:
alexsmirnov: nbelaevski : lets just pick an average #
[
10:27am
]
alexsmirnov
:
Some time ago we has had about 70% code coverage.
[
10:27am
]
pmuir
:
10? 100? 1000?
[
10:29am
]
alexsmirnov
:
Some tests are generated by the CDK. They test basic functionality of JSF component ( attributes, state saving, events ).
[
10:30am
]
nbelaevski
:
we have 3643 tests for 3.3.x
[
10:30am
]
pmuir
:
ok
[
10:30am
]
nbelaevski
:
that number covers CDK + framework + UI
[
10:30am
]
pmuir
:
stan, how long would jsfunit take to execute ~3500 tests?
[
10:30am
]
pmuir
:
and nick/alex, how long would a mock approach take (I guess around 60-120s)
[
10:31am
]
ssilvert
:
pmuir: It depends a lot on what the test does.
[
10:31am
]
balunasj
:
alexsmirnov: what are CDK generated tests using?
[
10:31am
]
balunasj
:
alexsmirnov: for 3.3.2
[
10:31am
]
pmuir
:
ssilvert: can you guess - are we talking 100s? 1000s? 10000s?
[
10:32am
]
ssilvert
:
ssilvert: If you are not hitting the UI then the test will be comparable.
[
10:33am
]
balunasj
:
alexsmirnov: using a mock approach would you actually be making http requests?
[
10:33am
]
alexsmirnov
:
3.3.2 uses Shale mock objects.
[
10:33am
]
balunasj
:
alexsmirnov: ok that is what I thought.
[
10:34am
]
alexsmirnov
:
I've written small extention that simulates http request using httpunit library.
[
10:34am
]
balunasj
:
alexsmirnov: ssilvert : this is where I think overlap is going to come in, and I would like to avoid.
[
10:35am
]
alexsmirnov
:
But it is hard to simulate full page using mock objects only.
[
10:35am
]
balunasj
:
alexsmirnov: agreed - that is why using JSF impl underneath is good.
[
10:36am
]
ssilvert
:
If you are hitting the UI a lot then JSFUnit tests will be slower.  But you always have more confidence in your environment.  That's the trade-off.
[
10:37am
]
ssilvert
:
I'd be interested to see the kinds of tests you want to do so I can see how we might make them fast running JSFUnit.
[
10:37am
]
alexsmirnov
:
ssilvert: sure. That is why every level of testing is important.
[
10:38am
]
balunasj
:
alexsmirnov: agreed, and that goes back to the idea of running in/out container tests as pete and I we discussing
[
10:38am
]
balunasj
:
Ideally using the same tests with annotation if they can be run using mocks.
[
10:38am
]
alexsmirnov
:
ssilvert: for example, test rendering of the same component with different configurations - client/server state saving,etc
[
10:38am
]
pmuir
:
i think we need to have an objective that we use JSFUnit with projects like Seam and RichFaces for both the "middle" testing tiers
[
10:39am
]
balunasj
:
but that would take something like JSFunit adding support for stand alone state.
[
10:39am
]
pmuir
:
i.e. the smoke testing and then commit testing
[
10:39am
]
balunasj
:
pmuir: agreed
[
10:40am
]
ssilvert
:
balunasj: You can already do that.  You don't have to stop the container.
[
10:41am
]
balunasj
:
ssilvert: just talking with stan, that I meant running tests as mockable without container,
[
10:41am
]
ssilvert
:
I'm hoping that JBoss Embedded will be fast enough that you will never need mocks again.
[
10:41am
]
pmuir
:
alexsmirnov: am i correct in saying that your only concern with using JSFUnit, not the mock approach, is the speed?
[
10:42am
]
balunasj
:
then being able to run the same tests + other that require container for commit testing.
[
10:42am
]
pmuir
:
ssilvert: but embedded is still a way off right? we don't have a firm date for it yet. We have to do work in the meantime...
[
10:43am
]
ssilvert
:
pmuir: I'll try to nail that down.
[
10:43am
]
alexsmirnov
:
pmuir: not the speed only, but easy control for environment too. With mock/stub objects I can create a different configuration for every tests.
[
10:44am
]
balunasj
:
eitherway we need to test this stuff today - and since we have stan and are able to push for features we need I see that and a great benifit over self maintained project.
[
10:44am
]
ssilvert
:
alexsmirnov: examples?
[
10:45am
]
ssilvert
:
balunasj: Yes, I'm really interested in your requirements because I'd like to make JSFUnit+Jboss Embedded be the complete solution.
[
10:45am
]
pmuir
:
alexsmirnov: ok, any other concerns? Once we know all the concerns we can address each one and look at how best to solve it inside of JSFUnit, rather than just giving in to NIH (Not invented here) syndrom
[
10:45am
]
pmuir
:
e
[
10:46am
]
alexsmirnov
:
pmuir: My last JSF-test project has a little about JSF but simulates web container only. it fast and controlled by test code, so JSFUnit could be used with it too.
[
10:46am
]
balunasj
:
alexsmirnov: are you saying that JSFUnit could your test framework as a container?
[
10:47am
]
alexsmirnov
:
it will be even faster then Jboss-embedded and developer can configure server directly from test code
[
10:47am
]
balunasj
:
alexsmirnov: use jsf-test to simulate the web-container?
[
10:47am
]
ssilvert
:
alexsmirnov: You can configure the container with JBoss Embedded using the profile manager.
[
10:47am
]
ssilvert
:
alexsmirnov: And you do it from your test.
[
10:48am
]
ssilvert
:
alexsmirnov: We were just discussing this yesterday.
[
10:49am
]
balunasj
:
not to mention that jetty (jsfunit default) starts really fast  and if we can work with stan on changes to meet our needs...
[
10:49am
]
ssilvert
:
I don't want to slow you down waiting for Embedded+JSFUnit solution, but I really do want to work with you to make sure that when we are done we have what you need.
[
10:51am
]
balunasj
:
alexsmirnov: Lets take a step back again and discuss what your requirements are for a develop test framework.  Perhaps we can work with stand to meet those needs, perhaps not, but lets get them out.
[
10:51am
]
pmuir
:
ssilvert: sounds good - and I think we can do 90% of what is needed with Jetty?
[
10:53am
]
ssilvert
:
Hopefully, but I don't know your requirements.
[
10:55am
]
ssilvert
:
I gotta go in just a minute.  Anything else?
[
10:56am
]
alexsmirnov
:
Seam and richfaces requirements could be a little different. Richfaces needs a JSF environment only but seam uses a much more.
[
10:56am
]
balunasj
:
alexsmirnov: ssilvert : I think the we should work together and standardize on a testing framework - both seam, wb, and seam can use.  We don't really have the time to completely maintain another project, and stan is willing to work with us to get it right.
[
10:57am
]
balunasj
:
alexsmirnov: I know the requirement are a little different between them, but there are common ground in JSf testing
[
10:58am
]
balunasj
:
ssilvert: can you review what alexsmirnov has already done and see if there is a place for it in JSFunit?
[
10:58am
]
ssilvert
:
JBoss Embedded will pull in everything you need.  I'll try to get an idea of when it will be ready.
[
10:58am
]
ssilvert
:
sure
[
10:58am
]
pmuir
:
right, lets concentrate on RichFaces for now - Seam is much less tied to JSF now than it used to be, so we will be testing a lot less in a JSF specific way in the future
[
10:59am
]
ssilvert
:
alexsmirnov: Can you point me to the stuff I need to look at?
[
10:59am
]
ssilvert
:
alexsmirnov: Just send me an email.  I need to go now.
[
10:59am
]
balunasj
:
alexsmirnov: also because RF would have the heaviest requirements on a JSF testing framework we need to be leading the effort to improve the one we have.
[
11:00am
]
alexsmirnov
:
ssilvert: I think the article http://www.jboss.org/community/wiki/TestDrivenJSFDevelopment describes an idea the best.
[
11:00am
]
balunasj
:
alexsmirnov: I forwarded that to him already, and can get him the location of the jsf-test-harness stuff too.
[
11:00am
]
balunasj
:
ssilvert: he had to leave
[
11:00am
]
balunasj
:
for another meeting
[
11:02am
]
balunasj
:
alexsmirnov: can you write up a quick email outlining some of you requirements for a testing framework and we can move this discussion to the email thread.
[
11:03am
]
alexsmirnov
:
All code in the http://anonsvn.jboss.org/repos/test-utils/jboss-test-jsf/trunk/ repository now. It contains Seam mock and stage server as well.
[
11:03am
]
balunasj
:
alexsmirnov: thanks for links.
[
11:03am
]
alexsmirnov
:
What is ssilvert email ?
[
11:05am
]
balunasj
:
ssilvert@redhat.com
[
11:05am
]
balunasj
:
alexsmirnov: ^
[
11:05am
]
ppitonak left the chat room. (Remote closed the connection)
[
11:05am
]
ilya_shaikovsky left the chat room. ("x3irc 7 client - http://x3irc.ru/")
[
11:08am
]
abelevich left the chat room. ("x3irc 7 client - http://x3irc.ru/")
[
11:08am
]
alexsmirnov
:
I wrote an introduction message for testing discussion.
[
11:11am
]
balunasj
:
alexsmirnov: thanks
[
11:19am
]
alexsmirnov
:
balunasj: Are we going to rest of agenda or you have a next meeting ?
[
11:20am
]
balunasj
:
alexsmirnov: no we need to cover in email and/or forums.
[
11:20am
]
balunasj
:
I'll send an email with ALPHA talk
[
11:21am
]
balunasj
:
I would like other to comment on the agenda if there are comments.
[
11:21am
]
balunasj
:
nbelaevski: alexsmirnov ^
[
11:25am
]
nbelaevski
:
balunasj: sure
[
11:25am
]
balunasj
:
I'll write up minutes this afternoon based on any comments I get.
[
11:27am
]
alexsmirnov
:
ok