[ 
https://issues.apache.org/jira/browse/WW-5734?focusedWorklogId=1041116&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1041116
 ]

ASF GitHub Bot logged work on WW-5734:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Sep/26 12:43
            Start Date: 12/Sep/26 12:43
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart opened a new pull request, #1924:
URL: https://github.com/apache/struts/pull/1924

   Fixes [WW-5734](https://issues.apache.org/jira/browse/WW-5734)
   
   ## Why
   
   The jasperreports7 plugin had never been exercised outside Spring's 
`MockHttpServletResponse` — no sample app uses it — which is how WW-5731, 
WW-5732 and WW-5733 (every export an empty `200` on Tomcat) shipped unnoticed 
since 7.1.0. The showcase can't host an example: JasperReports is LGPL and the 
showcase WAR is part of the release assembly (the previous example was removed 
for that reason in 2006).
   
   ## What
   
   `JasperReport7TomcatTest` boots Struts on `tomcat-embed-core` (**test 
scope**, 10.1.55, bound to 127.0.0.1 on a random port), compiles the existing 
`simple.jrxml` into the webapp's docBase under `target/`, and issues a real 
HTTP `GET /report.action?format=…` for each of the six bundled formats, 
asserting status, content type and payload (`%PDF`, `{\rtf`, `PK`, or the 
rendered text). Runs in ~1 s as part of the module's normal surefire run, under 
both the default and the `jakartaee11` profile.
   
   With the exporter providers reverted to their pre-WW-5733 state, all six 
assertions fail with an empty body — the real container symptom the mock could 
not show.
   
   Test-only change: nothing here reaches the plugin jar or the assembly 
(`runtime` dependency sets), and the OWASP profile skips test scope.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)




Issue Time Tracking
-------------------

            Worklog Id:     (was: 1041116)
    Remaining Estimate: 0h
            Time Spent: 10m

> Run the JasperReports 7 plugin end-to-end on an embedded Tomcat in its test 
> suite
> ---------------------------------------------------------------------------------
>
>                 Key: WW-5734
>                 URL: https://issues.apache.org/jira/browse/WW-5734
>             Project: Struts 2
>          Issue Type: Task
>          Components: Plugin - JasperReports
>            Reporter: Lukasz Lenart
>            Priority: Major
>             Fix For: 7.4.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{struts2-jasperreports7-plugin}} shipped in 7.1.0 and has never been 
> exercised end-to-end: no sample application uses it, and its unit tests drive 
> {{JasperReport7Result}} against Spring's {{MockHttpServletResponse}}, which 
> does not model container behaviour. That is how WW-5731 (single-line CSV), 
> WW-5732 (case-sensitive format lookup) and WW-5733 (every export an empty 
> {{200}} on Tomcat) went unnoticed for four minor releases.
> Adding the plugin to the showcase is not an option: JasperReports is LGPL 
> (ASF Category X) and the showcase WAR is part of the release assembly — the 
> previous showcase example was removed for exactly that reason in 2006.
> Add an integration test to the plugin module instead: boot Struts on 
> {{tomcat-embed-core}} (test scope, so the LGPL dependency is not 
> distributed), configure a package extending {{jasperreports7-default}} with 
> an action returning a {{jasperReport7}} result over a compiled {{.jrxml}}, 
> and assert that a real HTTP request returns a non-empty body of the expected 
> content type for each bundled format. The test stays in the module's surefire 
> run so CI exercises the plugin on every build.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to