You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by itsecfan <it...@yahoo.de> on 2006/06/19 22:22:04 UTC

Is the new "Report function" really just a GUI with no functionality?

 Hi all,

I am having trouble using the JMeter Report functionality which was newly introduced in JMeter 2.2. I can click around and arrange things in the GUI but it doesn't do anything if I start the report.

After having read around in the source it seems to me that this report functionality isn't finished yet.

Take e. g. this code snippet from org.apache.jmeter.report.gui.action.ReportStart:

    public void doAction(ActionEvent e) {
        if (e.getActionCommand().equals(ActionNames.ACTION_START)) {
            popupShouldSave(e);
            startEngine();
        } else if (e.getActionCommand().equals(ActionNames.ACTION_STOP)) {
            if (engine != null) {
                 ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage("");
                engine.stopTest();
                engine = null;
            }
        } else if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN)) {
            if (engine != null) {
                ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage("");
                engine.askThreadsToStop();
                engine = null;
            }
         }
    }

    protected void startEngine() {
        _/**
         * this will need to be changed
        ReportGuiPackage gui = ReportGuiPackage.getInstance();
        engine = new StandardJMeterEngine();
        HashTree testTree = gui.getTreeModel().getTestPlan();
        convertSubTree(testTree);
        DisabledComponentRemover remover = new DisabledComponentRemover(testTree);
        testTree.traverse(remover);
        testTree.add(testTree.getArray()[0], gui.getMainFrame());
        log.debug("test plan before cloning is running version: "
                 + ((TestPlan) testTree.getArray()[0]).isRunningVersion());
        TreeCloner cloner = new TreeCloner(false);
        testTree.traverse(cloner);
        engine.configure(cloner.getClonedTree());
        try {
            engine.runTest();
        } catch (JMeterEngineException e) {
            JOptionPane.showMessageDialog(gui.getMainFrame(), e.getMessage(), JMeterUtils
                    .getResString("Error Occurred"), JOptionPane.ERROR_MESSAGE);
        }
        log.debug("test plan after cloning and running test  is running version: "
                + ((TestPlan) testTree.getArray()[0]).isRunningVersion());
         */
    } 

OK. This won't do anything IMHO.
Can you confirm this? Or did I miss some kind of code black magic?
What use would it be releasing something unfinished and putting it on the "New functionalities" list? Wouldn't this confuse people (like me)?

Anyway, I still love JMeter. Keep up the good work.

Cheers,
Michael
 		
---------------------------------
Keine Lust auf Tippen? Rufen Sie Ihre Freunde einfach an.
  Yahoo! Messenger. Jetzt installieren . 

Re: Is the new "Report function" really just a GUI with no functionality?

Posted by Peter Lin <wo...@gmail.com>.
the Report GUI isn't done and doesn't work. Sorry for the confusion.

peter lin


On 6/19/06, itsecfan <it...@yahoo.de> wrote:
>
> Hi all,
>
> I am having trouble using the JMeter Report functionality which was newly
> introduced in JMeter 2.2. I can click around and arrange things in the GUI
> but it doesn't do anything if I start the report.
>
> After having read around in the source it seems to me that this report
> functionality isn't finished yet.
>
> Take e. g. this code snippet from
> org.apache.jmeter.report.gui.action.ReportStart:
>
>     public void doAction(ActionEvent e) {
>         if (e.getActionCommand().equals(ActionNames.ACTION_START)) {
>             popupShouldSave(e);
>             startEngine();
>         } else if (e.getActionCommand().equals(ActionNames.ACTION_STOP)) {
>             if (engine != null) {
>                  ReportGuiPackage.getInstance
> ().getMainFrame().showStoppingMessage("");
>                 engine.stopTest();
>                 engine = null;
>             }
>         } else if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN))
> {
>             if (engine != null) {
>                 ReportGuiPackage.getInstance
> ().getMainFrame().showStoppingMessage("");
>                 engine.askThreadsToStop();
>                 engine = null;
>             }
>          }
>     }
>
>     protected void startEngine() {
>         _/**
>          * this will need to be changed
>         ReportGuiPackage gui = ReportGuiPackage.getInstance();
>         engine = new StandardJMeterEngine();
>         HashTree testTree = gui.getTreeModel().getTestPlan();
>         convertSubTree(testTree);
>         DisabledComponentRemover remover = new
> DisabledComponentRemover(testTree);
>         testTree.traverse(remover);
>         testTree.add(testTree.getArray()[0], gui.getMainFrame());
>         log.debug("test plan before cloning is running version: "
>                  + ((TestPlan) testTree.getArray
> ()[0]).isRunningVersion());
>         TreeCloner cloner = new TreeCloner(false);
>         testTree.traverse(cloner);
>         engine.configure(cloner.getClonedTree());
>         try {
>             engine.runTest();
>         } catch (JMeterEngineException e) {
>             JOptionPane.showMessageDialog(gui.getMainFrame(), e.getMessage(),
> JMeterUtils
>                     .getResString("Error Occurred"),
> JOptionPane.ERROR_MESSAGE);
>         }
>         log.debug("test plan after cloning and running test  is running
> version: "
>                 + ((TestPlan) testTree.getArray()[0]).isRunningVersion());
>          */
>     }
>
> OK. This won't do anything IMHO.
> Can you confirm this? Or did I miss some kind of code black magic?
> What use would it be releasing something unfinished and putting it on the
> "New functionalities" list? Wouldn't this confuse people (like me)?
>
> Anyway, I still love JMeter. Keep up the good work.
>
> Cheers,
> Michael
>
> ---------------------------------
> Keine Lust auf Tippen? Rufen Sie Ihre Freunde einfach an.
>   Yahoo! Messenger. Jetzt installieren .
>