Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #37601

Re: Eclipse question

From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Eclipse question
Date 2017-10-27 23:44 +0000
Organization A noiseless patient Spider
Message-ID <ot0gc2$18t$1@dont-email.me> (permalink)
References (2 earlier) <a539e9c2-d3cf-4bf9-8a77-c78605ec1b3b@googlegroups.com> <osvgqo$1usm$1@gioia.aioe.org> <osvq1b$t1b$2@dont-email.me> <osvsmf$nd9$1@gioia.aioe.org> <2120adec-27d9-4a73-ba65-501806e891f5@googlegroups.com>

Show all headers | View raw


On Fri, 27 Oct 2017 11:23:10 -0700, Eric Douglas wrote:

> On Friday, October 27, 2017 at 2:08:26 PM UTC-4, Arne Vajhøj wrote:
>> It is a huge task to write really complete tests.
>> 
>> But my take on that is that non-complete tests are better than no
>> tests.
>> 
>> 
> Input-output is easy enough when my input is 2 and 6, my method is
> mutiply() and my result is 12.
> How do you write a complete test when my input is end user, my method is
> "drag mouse from GUI control A to control B", and my result is "does the
> end model show what the user expects".

Add logging to capture GUI inputs to the model and messages passed to the 
view by the controller as two separate files that represent test input 
data and the corresponding expected results. 

Write a test harness that plays the logged inputs into the model and  
captures controller outputs. Add a module that compares captured output 
with a previously generated set of outputs that has been checked and 
passed as correct: this is the expected results set. Any differences 
between test output and the expected results is an exception that MUST be 
investigated and treated as a bug until proved otherwise.

Now you've got a regression test harness that can exercise everything 
except the view and so will most likely catch the majority of logic, 
validation and error reporting problems. This should be fairly easy to 
write and, since the application can log messages that are the direct 
result of user input, it should be easy to generate quite complex test 
inputs for incorporation in your regression test set.

With this type of setup you may not need a GUI tester, since data flows 
within the view module are generally pretty direct and faults are obvious 
and anyway the model and controller logging is grabbing all the viewer 
model inputs and outputs, so is just what you need to debug viewer 
problems.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Eclipse question Eric Douglas <e.d.programmer@gmail.com> - 2017-10-27 05:32 -0700
  Re: Eclipse question Joerg Meier <joergmmeier@arcor.de> - 2017-10-27 15:29 +0200
    Re: Eclipse question Eric Douglas <e.d.programmer@gmail.com> - 2017-10-27 06:41 -0700
      Re: Eclipse question Arne Vajhøj <arne@vajhoej.dk> - 2017-10-27 10:45 -0400
        Re: Eclipse question Martin Gregorie <martin@address-in-sig.invalid> - 2017-10-27 17:22 +0000
          Re: Eclipse question Arne Vajhøj <arne@vajhoej.dk> - 2017-10-27 14:08 -0400
            Re: Eclipse question Eric Douglas <e.d.programmer@gmail.com> - 2017-10-27 11:23 -0700
              Re: Eclipse question Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-10-27 15:10 -0400
              Re: Eclipse question Arne Vajhøj <arne@vajhoej.dk> - 2017-10-27 19:05 -0400
              Re: Eclipse question Martin Gregorie <martin@address-in-sig.invalid> - 2017-10-27 23:44 +0000

csiph-web