[jira] [Updated] (COCOON-2224) Add integration tests
[ https://issues.apache.org/jira/browse/COCOON-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Francesco Chicchiriccò updated COCOON-2224: --- Fix Version/s: 2.2.1 Add integration tests - Key: COCOON-2224 URL: https://issues.apache.org/jira/browse/COCOON-2224 Project: Cocoon Issue Type: Task Components: Blocks: Event Cache Affects Versions: 2.2.1 Reporter: Lukas Lang Assignee: Reinhard Poetz Priority: Minor Fix For: 2.2.1 Attachments: patch.c2224.20080716.txt Add integration tests to the cocoon-webapp to verify functional requirements of the eventcache block. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (COCOON3-107) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail
[ https://issues.apache.org/jira/browse/COCOON3-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Francesco Chicchiriccò closed COCOON3-107. -- Resolution: Invalid This issue is generated by an incorrect fix for COCOON3-105 that I am about to revert. With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail - Key: COCOON3-107 URL: https://issues.apache.org/jira/browse/COCOON3-107 Project: Cocoon 3 Issue Type: Bug Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap Affects Versions: 3.0.0-beta-1 Reporter: Francesco Chicchiriccò Priority: Critical Fix For: 3.0.0-beta-1 Attachments: BlockcontextInterpreter.java, BlockcontextInterpreter.java This is happening as a consequence of COCOON3-105, by upgrading cocoon-servlet-service-impl to 1.3.2-SNAPSHOT and cocoon-block-deployment to 1.2.2-SNAPSHOT Basically, since there is no more an installed URLStreamHandlerFactory, every new URL() should include an instance of BlockContextURLStreamHandler. This makes every other URL loading (including XSLT sheets in a separate block, like happening for cocoon-sample-webapp) unaware of blockcontext:// URLs. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (COCOON3-107) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail
[ https://issues.apache.org/jira/browse/COCOON3-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thorsten Scherler updated COCOON3-107: -- Attachment: BlockcontextInterpreter.java interpreter to resolve blockcontext against actual file system With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail - Key: COCOON3-107 URL: https://issues.apache.org/jira/browse/COCOON3-107 Project: Cocoon 3 Issue Type: Bug Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap Affects Versions: 3.0.0-beta-1 Reporter: Francesco Chicchiriccò Priority: Critical Fix For: 3.0.0-beta-1 Attachments: BlockcontextInterpreter.java This is happening as a consequence of COCOON3-105, by upgrading cocoon-servlet-service-impl to 1.3.2-SNAPSHOT and cocoon-block-deployment to 1.2.2-SNAPSHOT Basically, since there is no more an installed URLStreamHandlerFactory, every new URL() should include an instance of BlockContextURLStreamHandler. This makes every other URL loading (including XSLT sheets in a separate block, like happening for cocoon-sample-webapp) unaware of blockcontext:// URLs. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COCOON3-107) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail
[ https://issues.apache.org/jira/browse/COCOON3-107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13482880#comment-13482880 ] Thorsten Scherler commented on COCOON3-107: --- add bean name=expression-language:blockcontext class=org.apache.cocoon.sitemap.expression.BlockcontextInterpreter / to your app context then use it in your sitemap as {blockcontext:raw-to-internal.xsl} where raw-to-internal.xsl would be resolved against the current blockservice file uri. With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail - Key: COCOON3-107 URL: https://issues.apache.org/jira/browse/COCOON3-107 Project: Cocoon 3 Issue Type: Bug Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap Affects Versions: 3.0.0-beta-1 Reporter: Francesco Chicchiriccò Priority: Critical Fix For: 3.0.0-beta-1 Attachments: BlockcontextInterpreter.java This is happening as a consequence of COCOON3-105, by upgrading cocoon-servlet-service-impl to 1.3.2-SNAPSHOT and cocoon-block-deployment to 1.2.2-SNAPSHOT Basically, since there is no more an installed URLStreamHandlerFactory, every new URL() should include an instance of BlockContextURLStreamHandler. This makes every other URL loading (including XSLT sheets in a separate block, like happening for cocoon-sample-webapp) unaware of blockcontext:// URLs. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (COCOON3-107) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail
[ https://issues.apache.org/jira/browse/COCOON3-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thorsten Scherler updated COCOON3-107: -- Attachment: BlockcontextInterpreter.java Slimed down version - without client deps ;) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail - Key: COCOON3-107 URL: https://issues.apache.org/jira/browse/COCOON3-107 Project: Cocoon 3 Issue Type: Bug Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap Affects Versions: 3.0.0-beta-1 Reporter: Francesco Chicchiriccò Priority: Critical Fix For: 3.0.0-beta-1 Attachments: BlockcontextInterpreter.java, BlockcontextInterpreter.java This is happening as a consequence of COCOON3-105, by upgrading cocoon-servlet-service-impl to 1.3.2-SNAPSHOT and cocoon-block-deployment to 1.2.2-SNAPSHOT Basically, since there is no more an installed URLStreamHandlerFactory, every new URL() should include an instance of BlockContextURLStreamHandler. This makes every other URL loading (including XSLT sheets in a separate block, like happening for cocoon-sample-webapp) unaware of blockcontext:// URLs. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (COCOON3-107) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail
Francesco Chicchiriccò created COCOON3-107: -- Summary: With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail Key: COCOON3-107 URL: https://issues.apache.org/jira/browse/COCOON3-107 Project: Cocoon 3 Issue Type: Bug Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap Affects Versions: 3.0.0-beta-1 Reporter: Francesco Chicchiriccò Priority: Critical Fix For: 3.0.0-beta-1 This is happening as a consequence of COCOON3-105. Basically, since there is no more an installed URLStreamHandlerFactory, every new URL() should include an instance of BlockContextURLStreamHandler. This makes every other URL loading (including XSLT sheets in a separate block, like happening for cocoon-sample-webapp) unaware of blockcontext:// URLs. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (COCOON3-107) With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail
[ https://issues.apache.org/jira/browse/COCOON3-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Francesco Chicchiriccò updated COCOON3-107: --- Description: This is happening as a consequence of COCOON3-105, by upgrading cocoon-servlet-service-impl to 1.3.2-SNAPSHOT and cocoon-block-deployment to 1.2.2-SNAPSHOT Basically, since there is no more an installed URLStreamHandlerFactory, every new URL() should include an instance of BlockContextURLStreamHandler. This makes every other URL loading (including XSLT sheets in a separate block, like happening for cocoon-sample-webapp) unaware of blockcontext:// URLs. was: This is happening as a consequence of COCOON3-105. Basically, since there is no more an installed URLStreamHandlerFactory, every new URL() should include an instance of BlockContextURLStreamHandler. This makes every other URL loading (including XSLT sheets in a separate block, like happening for cocoon-sample-webapp) unaware of blockcontext:// URLs. With latest cocoon-block-deployment and cocoon-service-impl SNAPSHOTs, integration tests fail - Key: COCOON3-107 URL: https://issues.apache.org/jira/browse/COCOON3-107 Project: Cocoon 3 Issue Type: Bug Components: cocoon-sample-webapp, cocoon-servlet, cocoon-sitemap Affects Versions: 3.0.0-beta-1 Reporter: Francesco Chicchiriccò Priority: Critical Fix For: 3.0.0-beta-1 This is happening as a consequence of COCOON3-105, by upgrading cocoon-servlet-service-impl to 1.3.2-SNAPSHOT and cocoon-block-deployment to 1.2.2-SNAPSHOT Basically, since there is no more an installed URLStreamHandlerFactory, every new URL() should include an instance of BlockContextURLStreamHandler. This makes every other URL loading (including XSLT sheets in a separate block, like happening for cocoon-sample-webapp) unaware of blockcontext:// URLs. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [c3 monitoring] Integration tests
Dariusz Łuksza wrote: Hi, I'm back on track after some time of absence. Welcome back! To write integration tests I should start programaticaly cocoon with predefined configuration's. Then test suites should connect to JMX service and check does everything is all right. So there are two goals: * start cocoon from test case with predefine configuration * write small JMX client that would only connect to JMX service and get list of available services. The main question is where can I find examples how to achieve first goal ? IIUC, the main problem is that you have to start your own VM instance, right? Have a look at http://commons.apache.org/exec/. In this VM instance you can start a Jetty server yourself (e.g. http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-it-fw/src/main/java/org/apache/cocoon/maven/test/jetty/JettyStarterMojo.java) HTH -- Reinhard Pötz Managing Director, {Indoqa} GmbH http://www.indoqa.com/en/people/reinhard.poetz/ Member of the Apache Software Foundation Apache Cocoon Committer, PMC member reinh...@apache.org
[c3 monitoring] Integration tests
Hi, I'm back on track after some time of absence. To write integration tests I should start programaticaly cocoon with predefined configuration's. Then test suites should connect to JMX service and check does everything is all right. So there are two goals: * start cocoon from test case with predefine configuration * write small JMX client that would only connect to JMX service and get list of available services. The main question is where can I find examples how to achieve first goal ? IMHO second goal is ease to achieve. Thanks in advance for yous help ;) -- Best regards Blog: http://luksza.org LinkedIn: http://www.linkedin.com/in/dariuszluksza
[jira] Created: (COCOON-2235) Write integration tests for springified JCR block
Write integration tests for springified JCR block - Key: COCOON-2235 URL: https://issues.apache.org/jira/browse/COCOON-2235 Project: Cocoon Issue Type: Task Components: Blocks: JCR Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Priority: Minor -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COCOON-2235) Write integration tests for springified JCR block
[ https://issues.apache.org/jira/browse/COCOON-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lukas Lang updated COCOON-2235: --- Attachment: patch.c2235.20080813.txt Added integration tests for JCR block. Write integration tests for springified JCR block - Key: COCOON-2235 URL: https://issues.apache.org/jira/browse/COCOON-2235 Project: Cocoon Issue Type: Task Components: Blocks: JCR Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Priority: Minor Attachments: patch.c2235.20080813.txt -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COCOON-2230) Write integration tests for JMS block
[ https://issues.apache.org/jira/browse/COCOON-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lukas Lang updated COCOON-2230: --- Attachment: patch.c2230.20080730.txt Apply this patch to the cocoon-core directory. Write integration tests for JMS block - Key: COCOON-2230 URL: https://issues.apache.org/jira/browse/COCOON-2230 Project: Cocoon Issue Type: Task Components: Blocks: JMS Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Priority: Minor Attachments: patch.c2230.20080730.txt, patch.c2330.20080729.txt -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Assigned: (COCOON-2230) Write integration tests for JMS block
[ https://issues.apache.org/jira/browse/COCOON-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reinhard Poetz reassigned COCOON-2230: -- Assignee: Reinhard Poetz Write integration tests for JMS block - Key: COCOON-2230 URL: https://issues.apache.org/jira/browse/COCOON-2230 Project: Cocoon Issue Type: Task Components: Blocks: JMS Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Assignee: Reinhard Poetz Priority: Minor Attachments: patch.c2230.20080730.txt, patch.c2330.20080729.txt -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (COCOON-2230) Write integration tests for JMS block
[ https://issues.apache.org/jira/browse/COCOON-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reinhard Poetz closed COCOON-2230. -- Resolution: Fixed thanks, patch applied Write integration tests for JMS block - Key: COCOON-2230 URL: https://issues.apache.org/jira/browse/COCOON-2230 Project: Cocoon Issue Type: Task Components: Blocks: JMS Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Assignee: Reinhard Poetz Priority: Minor Attachments: patch.c2230.20080730.txt, patch.c2330.20080729.txt -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COCOON-2230) Write integration tests for JMS block
[ https://issues.apache.org/jira/browse/COCOON-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lukas Lang updated COCOON-2230: --- Attachment: patch.c2330.20080729.txt Write integration tests for JMS block - Key: COCOON-2230 URL: https://issues.apache.org/jira/browse/COCOON-2230 Project: Cocoon Issue Type: Task Components: Blocks: JMS Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Priority: Minor Attachments: patch.c2330.20080729.txt -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Assigned: (COCOON-2224) Add integration tests
[ https://issues.apache.org/jira/browse/COCOON-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reinhard Poetz reassigned COCOON-2224: -- Assignee: Reinhard Poetz Add integration tests - Key: COCOON-2224 URL: https://issues.apache.org/jira/browse/COCOON-2224 Project: Cocoon Issue Type: Task Components: Blocks: Event Cache Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Assignee: Reinhard Poetz Priority: Minor Attachments: patch.c2224.20080716.txt Add integration tests to the cocoon-webapp to verify functional requirements of the eventcache block. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Closed: (COCOON-2224) Add integration tests
[ https://issues.apache.org/jira/browse/COCOON-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Reinhard Poetz closed COCOON-2224. -- Resolution: Fixed tests work fine. thanks! Add integration tests - Key: COCOON-2224 URL: https://issues.apache.org/jira/browse/COCOON-2224 Project: Cocoon Issue Type: Task Components: Blocks: Event Cache Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Assignee: Reinhard Poetz Priority: Minor Attachments: patch.c2224.20080716.txt Add integration tests to the cocoon-webapp to verify functional requirements of the eventcache block. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (COCOON-2230) Write integration tests for JMS block
Write integration tests for JMS block - Key: COCOON-2230 URL: https://issues.apache.org/jira/browse/COCOON-2230 Project: Cocoon Issue Type: Task Components: Blocks: JMS Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Priority: Minor -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Created: (COCOON-2224) Add integration tests
Add integration tests - Key: COCOON-2224 URL: https://issues.apache.org/jira/browse/COCOON-2224 Project: Cocoon Issue Type: Task Components: Blocks: Event Cache Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Priority: Minor Add integration tests to the cocoon-webapp to verify functional requirements of the eventcache block. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Updated: (COCOON-2224) Add integration tests
[ https://issues.apache.org/jira/browse/COCOON-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lukas Lang updated COCOON-2224: --- Attachment: patch.c2224.20080716.txt Add integration tests - Key: COCOON-2224 URL: https://issues.apache.org/jira/browse/COCOON-2224 Project: Cocoon Issue Type: Task Components: Blocks: Event Cache Affects Versions: 2.2-dev (Current SVN) Reporter: Lukas Lang Priority: Minor Attachments: patch.c2224.20080716.txt Add integration tests to the cocoon-webapp to verify functional requirements of the eventcache block. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: Integration tests
Reinhard Poetz pisze: Grzegorz Kossakowski wrote: [EMAIL PROTECTED] pisze: I'm not sure how to say this but... Guys, there is a lot of to cover by test in this module and writing tests in trunk is not painful by any means. you are right and this particular bug was my fault because I haven't written any tests yet. However, if you followed my commit messages, you saw that I was able to enable integration tests for trunk ('mvn install -P it' from cocoon-webapp runs the tests in cocoon-webapp/src/test/java). My next step on my todo list is covering the SSF with tests. Yes I was very happy to see your commits. However, I always thought that it's first that you write unit tests for covering the most basic functionality and ITs for testing how different parts interact with each other. Doesn't it make sense to write a few unit tests first? What kind of ITs do you plan to write? Could somebody with admin rights on vmbuild help me with adding the integration tests to Continuum? Sure, tell what command exactly is needed to be fired. Is mvn clean install -P allbocks,it enough? -- Grzegorz Kossakowski Committer and PMC Member of Apache Cocoon http://reflectingonthevicissitudes.wordpress.com/
Re: Integration tests
Grzegorz Kossakowski wrote: Reinhard Poetz pisze: Grzegorz Kossakowski wrote: [EMAIL PROTECTED] pisze: I'm not sure how to say this but... Guys, there is a lot of to cover by test in this module and writing tests in trunk is not painful by any means. you are right and this particular bug was my fault because I haven't written any tests yet. However, if you followed my commit messages, you saw that I was able to enable integration tests for trunk ('mvn install -P it' from cocoon-webapp runs the tests in cocoon-webapp/src/test/java). My next step on my todo list is covering the SSF with tests. Yes I was very happy to see your commits. However, I always thought that it's first that you write unit tests for covering the most basic functionality and ITs for testing how different parts interact with each other. Doesn't it make sense to write a few unit tests first? What kind of ITs do you plan to write? Could somebody with admin rights on vmbuild help me with adding the integration tests to Continuum? Sure, tell what command exactly is needed to be fired. Is mvn clean install -P allbocks,it enough? -- Reinhard PötzManaging Director, {Indoqa} GmbH http://www.indoqa.com/en/people/reinhard.poetz/ Member of the Apache Software Foundation Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED] _
Re: Integration tests
Grzegorz Kossakowski wrote: Reinhard Poetz pisze: Grzegorz Kossakowski wrote: [EMAIL PROTECTED] pisze: I'm not sure how to say this but... Guys, there is a lot of to cover by test in this module and writing tests in trunk is not painful by any means. you are right and this particular bug was my fault because I haven't written any tests yet. However, if you followed my commit messages, you saw that I was able to enable integration tests for trunk ('mvn install -P it' from cocoon-webapp runs the tests in cocoon-webapp/src/test/java). My next step on my todo list is covering the SSF with tests. Yes I was very happy to see your commits. However, I always thought that it's first that you write unit tests for covering the most basic functionality and ITs for testing how different parts interact with each other. Doesn't it make sense to write a few unit tests first? :-) yes, I fully agree. However, I wanted to explore the code by writing unit tests but I failed. Maybe I invested to less time but I came to the conclustion that it is easier to write integration tests. What kind of ITs do you plan to write? I want to test ... o absolute and relative connections to servlet services o connecting to blocks using the servlet:/ protocol o super connections o accessing information coming from the original request o error handling o postable sources o servlet-service generator/transformer/serializer Could somebody with admin rights on vmbuild help me with adding the integration tests to Continuum? Sure, tell what command exactly is needed to be fired. Is mvn clean install -P allbocks,it enough? yes -- Reinhard PötzManaging Director, {Indoqa} GmbH http://www.indoqa.com/en/people/reinhard.poetz/ Member of the Apache Software Foundation Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED] _
Re: Integration tests
Reinhard Poetz pisze: Grzegorz Kossakowski wrote: Reinhard Poetz pisze: Yes I was very happy to see your commits. However, I always thought that it's first that you write unit tests for covering the most basic functionality and ITs for testing how different parts interact with each other. Doesn't it make sense to write a few unit tests first? :-) yes, I fully agree. However, I wanted to explore the code by writing unit tests but I failed. Maybe I invested to less time but I came to the conclustion that it is easier to write integration tests. I don't understand what you mean exactly. Do you mean it was too complicated to write unit tests? I haven't taken a closer look at your IT work but I guess it should be always easier to write isolated unit tests than ITs. Am I wrong? What kind of ITs do you plan to write? I want to test ... o absolute and relative connections to servlet services o connecting to blocks using the servlet:/ protocol o super connections o accessing information coming from the original request o error handling o postable sources o servlet-service generator/transformer/serializer I don't want to be pesky but... most of these items looks like perfect cases for unit tests. Don't they? I'm not feeling good about testing basic functionality by using ITs because it introduces too much dependencies, IMHO. It was Daniel who taught me how to keep number of dependencies in tests as small as possible. He was endlessly reminding me when I was working during GSoC to use classes inheriting from pure TestCase and now I see he was perfectly right. Tests are normal code, the more complicated dependencies you introduce the more it's hard to maintain such code... Sure, tell what command exactly is needed to be fired. Is mvn clean install -P allbocks,it enough? yes Configuration at Continuum updated. -- Grzegorz Kossakowski Committer and PMC Member of Apache Cocoon http://reflectingonthevicissitudes.wordpress.com/
Re: Integration tests
Grzegorz Kossakowski wrote: Reinhard Poetz pisze: Grzegorz Kossakowski wrote: Reinhard Poetz pisze: Yes I was very happy to see your commits. However, I always thought that it's first that you write unit tests for covering the most basic functionality and ITs for testing how different parts interact with each other. Doesn't it make sense to write a few unit tests first? :-) yes, I fully agree. However, I wanted to explore the code by writing unit tests but I failed. Maybe I invested to less time but I came to the conclustion that it is easier to write integration tests. I don't understand what you mean exactly. Do you mean it was too complicated to write unit tests? I haven't taken a closer look at your IT work but I guess it should be always easier to write isolated unit tests than ITs. Am I wrong? hmmm, it depends. Integration tests for Cocoon have always been tests at HTTP/XHTML level. The only difficult part is setting up the environment. Everything else is checking if an http call produces the right output which is fairly easy using XPath asserts or XMLDiff. What kind of ITs do you plan to write? I want to test ... o absolute and relative connections to servlet services o connecting to blocks using the servlet:/ protocol o super connections o accessing information coming from the original request o error handling o postable sources o servlet-service generator/transformer/serializer I don't want to be pesky but... most of these items looks like perfect cases for unit tests. Don't they? I'm not feeling good about testing basic functionality by using ITs because it introduces too much dependencies, IMHO. What kind of dependencies? It was Daniel who taught me how to keep number of dependencies in tests as small as possible. He was endlessly reminding me when I was working during GSoC to use classes inheriting from pure TestCase and now I see he was perfectly right. Tests are normal code, the more complicated dependencies you introduce the more it's hard to maintain such code... My problem is that the time that I can dedicate to this task is very limited and I fear that if it gets too complicated (for me) or time-consuming I won't do it. Sure, tell what command exactly is needed to be fired. Is mvn clean install -P allbocks,it enough? yes Configuration at Continuum updated. Thanks! -- Reinhard PötzManaging Director, {Indoqa} GmbH http://www.indoqa.com/en/people/reinhard.poetz/ Member of the Apache Software Foundation Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED] _
Re: Integration tests
On Jan 15, 2008 9:44 PM, Reinhard Poetz [EMAIL PROTECTED] wrote: Grzegorz Kossakowski wrote: ...I guess it should be always easier to write isolated unit tests than ITs. Am I wrong? hmmm, it depends. Integration tests for Cocoon have always been tests at HTTP/XHTML level Might be just a question of terminology. When you're creating an HTTP servlet, it is not really usable outside of an HTTP environment. So (and test purists might hate me for saying that ;-), one could argue that testing servlets via HTTP is actually a unit test. It's just that it happens over HTTP instead of being just java method calls. -Bertrand
Integration tests
Grzegorz Kossakowski wrote: [EMAIL PROTECTED] pisze: Author: gkossakowski Date: Mon Jan 14 17:19:28 2008 New Revision: 611986 URL: http://svn.apache.org/viewvc?rev=611986view=rev Log: COCOON-2161: Fixed bug in creation of absolute URI and added test case covering this functionality. I'm not sure how to say this but... Guys, there is a lot of to cover by test in this module and writing tests in trunk is not painful by any means. you are right and this particular bug was my fault because I haven't written any tests yet. However, if you followed my commit messages, you saw that I was able to enable integration tests for trunk ('mvn install -P it' from cocoon-webapp runs the tests in cocoon-webapp/src/test/java). My next step on my todo list is covering the SSF with tests. Could somebody with admin rights on vmbuild help me with adding the integration tests to Continuum? -- Reinhard PötzManaging Director, {Indoqa} GmbH http://www.indoqa.com/en/people/reinhard.poetz/ Member of the Apache Software Foundation Apache Cocoon Committer, PMC member, PMC Chair[EMAIL PROTECTED] _