- what do people use for automated testing of C++ Windows app ? - 7 Updates
- C++ Middleware Writer - 9 Updates
- Default values in #define - 2 Updates
Lynn McGuire <lynnmcguire5@gmail.com>: Aug 21 06:48PM -0500 On 8/21/2016 2:15 PM, Richard wrote: > You can see me refactor some existing C# code into Mediator pattern > here: > <http://confreaks.tv/videos/agileroots2009-test-driven-development-and-refactoring-part-two> I have three levels of automated tests now. The first level tests our UI with the ability to open 400+ test files, resave them, and run our calculation engine with them, takes 12 hours to run. The second level adds extreme regression of our calculation engine with 700+ additional files, takes another 12 hours to run. The third level adds 13,000+ customer files with the opening, saving, and execution of the calculation engine, takes 6 more days to run. The third level is just a test of the various combinations of user options to make sure that our UI and calculation engine do not crash. We use our own hand built diagramming toolkit in Win32 C++ dating back to 1987 or so. I would to have something like Qt but that is another day. We are not scriptable but easily programmable to do stuff. I would like to find a test tool that allows us to test from the UI level. Something that allows us to test multiple stage of expected behavior across various dialogs. Sincerely, Lynn McGuire |
legalize+jeeves@mail.xmission.com (Richard): Aug 22 07:15AM [Please do not mail me a copy of your followup] Lynn McGuire <lynnmcguire5@gmail.com> spake the secret code >I would like to find a test tool that allows us to test from the UI >level. Something that allows us to test multiple stage of expected >behavior across various dialogs. There are a number of tools that can synthesize events and then poke at the resulting Win32 controls to attempt to verify the results. However, they are very fragile and labor intensive to both create and maintain. Sometimes they just don't work at all because the Win32 API wasn't really designed so that application B can probe all the internal state of the controls in application A. This is particularly problematic when you write custom handlers for the low level events. Also, these scripts are not portable so if you have cross-platform code and have to care about testing on Mac or Linux, you will end up needing tests for each platform as the event playback style of testing is very platform specific. One option is to build the event recording and playback directly into your application. I've worked on C++ code bases that did this and while it gave them the ability to playback a user's session (valuable for more things than just regression testing), it was very labor intensive to create and maintain. Sometimes, this might be the only reliable way of reproducing certain user issues, however. For instance, a CAD program is used in sessions lasting hours or perhaps even days. When the CAD program crashes, there may be no way to easily reproduce the problem from a few edit steps in a fresh session. You may need the entire session playback in order to reproduce the problem. Some games have a record/playback feature to support debugging of user problems encountered during gameplay for a similar reason. You don't state if your goal is to cover new features and enhancements to existing features or if your goal is to build a regression suite. As I mentioned earlier, event synthesis/control probing schemes are OK for regressions. They are still very labor intensive to create and maintain, but if the UI isn't constantly changing the investment can be ammortized over time. A scheme like FitNesse tests tied directly to the business logic is better, however. You really want to make your UI as dumb as possible so that it can be shown correct by inspection instead of by automated testing. This is the so-called "Humble Dialog". Put the automated testing to work on the underlying business logic that produces results shown by the UI. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Computer Graphics Museum <http://computergraphicsmuseum.org> The Terminals Wiki <http://terminals.classiccmp.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
"Öö Tiib" <ootiib@hot.ee>: Aug 22 05:20AM -0700 On Monday, 22 August 2016 02:30:27 UTC+3, Lynn McGuire wrote: > Thanks for the list! > Wow, my shop is me and three programmers, plus other support personnel. > I am going to need something a little less manpower intensive. It may depend how large and friendly user base you have but in general you need at least one engineer fully dedicated to quality anyway. Focus to quality is too different from focus to functionality and often hard to switch between for programmers. Low quality software is considered creepy by lot of customers. Test suite that interacts with GUI (does its drags, taps, scrolls, slides, pulls and rotates in meaningful way) and recognizes validity of outcome can not be trivial and so inevitably takes complex scripting. If you don't have budget for full coverage tests then try to automate at least regression tests. Places that have been ever broken are fragile and so regressions are surprisingly common. |
Lynn McGuire <lynnmcguire5@gmail.com>: Aug 22 12:49PM -0500 On 8/20/2016 5:20 PM, Lynn McGuire wrote: > http://stackoverflow.com/questions/1287425/automated-testing-for-c-c-gui-applications > Thanks, > Lynn Interesting article, "Why Are There So Many C++ Testing Frameworks?": http://googletesting.blogspot.com/2012/10/why-are-there-so-many-c-testing.html Lynn |
legalize+jeeves@mail.xmission.com (Richard): Aug 22 07:54PM [Please do not mail me a copy of your followup] Lynn McGuire <lynnmcguire5@gmail.com> spake the secret code >Interesting article, "Why Are There So Many C++ Testing Frameworks?": >http://googletesting.blogspot.com/2012/10/why-are-there-so-many-c-testing.html Without reading the article, my guesses are: - there wasn't one, so we made our own and kept using it - open source egoism[*] - there's no defacto standard like jUnit - framework PQR doesn't do enough, so I made my own - framework PQR does too much, so I made my own Now let's go look at the article and see how I did. Google says PQR doesn't do enough, so they made their own: "The short answer is that we couldn't find an existing C++ testing framework that satisfied all our needs." Which frankly I find hard to believe because there isn't anything in GTest that wasn't already in Boost.Test AFAICT. Maybe it was the use of exceptions they didn't like, I can't recall if Boost.Test relies on exceptions or simply supports testing code that uses them. [*] "open source egoism" is what I call the phenomenon of what motivates people to contribute to open source. It's much sexier to create your own thing from scratch than it is to do bug fixes on an existing thing or enhance/extend an existing thing. Therefore, open source software development tends to result in lots of greenfield projects that do just enough to scratch the author's itch and they don't build a community that extends them further. Therefore a profusion of small greenfield projects appear, but none of them is sufficiently embraced to gain dominance. -- "The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline> The Computer Graphics Museum <http://computergraphicsmuseum.org> The Terminals Wiki <http://terminals.classiccmp.org> Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com> |
Lynn McGuire <lynnmcguire5@gmail.com>: Aug 22 03:36PM -0500 On 8/22/2016 2:54 PM, Richard wrote: > don't build a community that extends them further. Therefore a > profusion of small greenfield projects appear, but none of them is > sufficiently embraced to gain dominance. And they are Google. Lynn |
"Öö Tiib" <ootiib@hot.ee>: Aug 22 03:57PM -0700 On Monday, 22 August 2016 23:36:58 UTC+3, Lynn McGuire wrote: > > profusion of small greenfield projects appear, but none of them is > > sufficiently embraced to gain dominance. > And they are Google. For me it means "a large company that aggressively avoids taxes worldwide". Why google is better than others? Amazon pays taxes, oracle pays taxes, microsoft pays taxes, apple pays taxes. Google should pay taxes too. They indeed have a odd religion against C++ exceptions. So if other frameworks did not compile with exceptions turned off then they had to make their own. |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Aug 22 02:02AM +0200 On 21.08.2016 18:06, Paavo Helde wrote: >> those sagaciously. ;) > I had to look up this word ;-) And yes, that's exactly what crocodiles > seem to do, most of the time :-) I think it's simple, trivial really: we started walking upright to free our hands for throwing, tool use, fighting, picking, carrying, scratching etc. Difficult to do these things when you're walking on your hands. Better to walk upright then. ;-) Cheers!, - Alf |
Christian Gollwitzer <auriocus@gmx.de>: Aug 22 07:25AM +0200 Am 22.08.16 um 02:02 schrieb Alf P. Steinbach: > our hands for throwing, tool use, fighting, picking, carrying, > scratching etc. Difficult to do these things when you're walking on your > hands. Better to walk upright then. ;-) And it's not even unique to humans. Apes can do it https://www.youtube.com/watch?v=CrQf6cogMuI some bears can do it https://www.youtube.com/watch?v=U5cqbsCJ3gQ the difference is that we always walk upright. This is really just incremental evolution, but (I believe) triggered the evolution of the hands and thus the brain. Christian |
Ike Naar <ike@iceland.freeshell.org>: Aug 22 06:33AM > the difference is that we always walk upright. This is really just > incremental evolution, but (I believe) triggered the evolution of the > hands and thus the brain. Birds walk upright. |
Christian Gollwitzer <auriocus@gmx.de>: Aug 22 08:48AM +0200 Am 22.08.16 um 08:33 schrieb Ike Naar: >> incremental evolution, but (I believe) triggered the evolution of the >> hands and thus the brain. > Birds walk upright. That's true. But their "hands" are wings and cannot be used to manipulate objects. The beak works like a single "tweezer" to handle objects (bild nests etc.). Bears and Apes have two forearms, which gives much more versatile handling. Evolving additional arms is very hard, repurposing the existing ones is easier. Who knows, give birds another 100 million years, and they might develop higher intelligence as well. Christian |
David Brown <david.brown@hesbynett.no>: Aug 22 08:59AM +0200 On 22/08/16 07:25, Christian Gollwitzer wrote: >> hands. Better to walk upright then. ;-) > And it's not even unique to humans. Apes can do it > https://www.youtube.com/watch?v=CrQf6cogMuI Don't forget that humans /are/ apes :-) > the difference is that we always walk upright. This is really just > incremental evolution, but (I believe) triggered the evolution of the > hands and thus the brain. The whole process is likely to be a combined loop - as our ancestors wanted to carry more things (or use more things in their hands), it was helpful to walk more upright. And as they walked more upright, they could carry more things. As they could use more tools, the smarter ones were more successful. As they got smarter, they could use more tools. As you say, it is mostly just incremental evolution, in very small steps over a long period of time. But there were also jumps along the way, such as the random genetic mutation that gave our vocal chords a much wider range of sounds. Until that point, our speech was probably a combination of grunts and similar noises, and sign language. Once we could make enough different noises, spoken language meant that we could communicate better while using our hands for other things, and modern development really took off. (Of course much of this is speculative - fossil evidence doesn't answer all the questions we have, nor does genetic analysis. But it does explain why we find sign language as easy to learn as spoken language, and use the same areas of the brain for handling it.) |
David Brown <david.brown@hesbynett.no>: Aug 22 09:02AM +0200 On 21/08/16 11:19, jacob navia wrote: >> Isn't it just a description of anyone else's code? :-) > If after 15+ years the code is like that, imagine after just a few > MILLION years... But the great thing about code - even your own code - is that after a million years (or presumably much less, depending on the retirement age in your country), it will all be an SEP. |
Ike Naar <ike@iceland.freeshell.org>: Aug 22 07:41AM > But the great thing about code - even your own code - is that after a > million years (or presumably much less, depending on the retirement age > in your country), it will all be an SEP. I'm not good at acronyms. What kind of SEP are you talking about? SEP September SEP State Energy Program SEP Separate SEP Simplified Employee Pension (IRS; type of IRA) SEP Saturday Evening Post (US Periodical) SEP Secretaria de Educacion Publica SEP Stanford Encyclopedia of Philosophy SEP Socialist Equality Party SEP Socialist Equality Party (Australia) SEP Separator (orthodontics; programming) SEP Someone Else's Problem SEP Secretaría de Educación Pública (Spanish) SEP Search Engine Promotion SEP Search Engine Positioning SEP Summer Enrichment Program SEP Sclerose en Plaque (French: Multiple Sclerosis) SEP Student Exchange Program SEP South End Press SEP Somebody Else's Problem (Douglas Adams, Hitchhiker's Triology) SEP Somatosensory Evoked Potential SEP Supplemental Environmental Projects (US EPA) SEP Single Entry Point SEP Special Emphasis Panel SEP Systems Engineering Plan SEP Special Emphasis Program SEP Société en Participation (French: Joint Venture; business structure) SEP Single Engine Piston (type rating for JAA Pilots License) SEP Systems Engineering Process SEP Sexual Encounter Profile SEP Senior Executive Program SEP Solar Energetic Particles SEP Sound Engineering Practice(s) SEP Syringe Exchange Program SEP Sequential Exchange Protocol (computer networking) SEP Solar Electric Propulsion SEP Special Election Period (US Medicare) SEP Science Education Programs SEP Scottish Equity Partners SEP System Enhancement Program (US Army M1A2 tank) SEP Secure Electronic Payment SEP Secondary Education Program SEP Solvent Extraction Process SEP Soldier Enhancement Program SEP System Engineering Process SEP Science Enhancement Programme (UK) SEP Single Exit Price (South Africa) SEP Symmetric Eigenproblems SEP Science Enrichment Program (University of Massachusetts Amherst) SEP Spherical Error Probable SEP Secondary Education Project SEP Sociedade Brasileira de Economia Politica (Brasil) SEP Saturday Enrichment Program SEP Safety Enhancement Program SEP Stanford Executive Program SEP Signaling End Point SEP Sistema de Estudios de Posgrado (Costa Rica) SEP Serum Electrophoresis SEP Symbol Error Probability SEP Specific Excess Power SEP Surface Electrical Properties SEP Sociedad Española de Pedagogía (Spain) SEP Single Edge Processor SEP State Emergency Plan SEP Smallpox Eradication Program (WHO) SEP Society for Exact Philosophy SEP Strategische Erfolgspositionen (German: strategic success positions) SEP Service Entry Point (call center software) SEP Scalable Encryption Processing SEP Sociedad Española de Paleontologia (Spain) SEP Society of Experimental Psychologists SEP Service de l'Emploi Pénitentiaire (French: Prison Employment Service) SEP Summer Education Program SEP Sociedade Esportiva Palmeiras (Brazilian soccer club) SEP Storage Enclosure Processor SEP Staff Exchange Program SEP Supplemental Environmental Program SEP Site Emergency Plan SEP Simple Exclusion Process SEP Salmon Enhancement Program (est. 1977; Fisheries and Oceans Canada) SEP Special Embassy Program SEP Service Enhancement Program SEP Systems Enhancement Program SEP Supplementary Environmental Project (EPA) SEP Single-Event Phenomena (radiation and semiconductor electronics) SEP Standard Evaluation Procedures (EPA) SEP System Evaluation Plan SEP Signal Entry Panel SEP Service de l'Enseignement Prive (French: Service of Private Teaching, Geneva) SEP Security Evaluation Program SEP Secure Exchange Protocol SEP Secretariado de Estudios Propios SEP Syndicat de l'Education Populaire (French: Union of Popular Education) SEP Strathclyde European Partnership Ltd (UK) SEP Software Enhancement Proposal SEP Systematic Evaluation Program SEP Swine Enzootic Pneumonia (mycoplasmosis) SEP Scorched Earth Productions SEP Sanctuary Education Panel (NOAA) SEP Software Entwicklungs Praktikum SEP Secretaría Ejecutiva de la Presidencia (Spanish) SEP Selsius Ethernet Phone SEP Severely Errored Period SEP Société d'Equipement du Poitou (French: Equipment Corporation of Poitou) SEP Special Energy Programme (Kenya) SEP Swiss Expert Pool (for Civilian Peacebuilding) SEP Standard Error Prediction SEP Satellite Education Program SEP Safety and Emergency Procedure SEP Société d'Encouragement au Progrès SEP Sequence Endpoint SEP Science Entrepreneurship Program (Case Western Reserve University) SEP Software End Product SEP Safety Evaluation Panel SEP Safety Evaluation for Packaging SEP Selective Employment Plan SEP Service Engineering Process SEP Spherical Error of Probability SEP Strain Energy Partitioning SEP Synthetic Environment Program SEP System Enhancement Proposal SEP Simultaneous Examination Program (US IRS) SEP Spanning Explorer Packet (Cisco) SEP Service Execution Plan SEP Software Execution Platform SEP Solar Electron Package SEP Solar Energetics Package SEP Somebody's Elses Problem SEP Site Evaluation Panel SEP Shipbuilders' Estimating Package SEP Selectively Enhanced Polymer SEP Scientific & Engineering Personnel SEP Strategic Execution Planning SEP Stable Element Panel SEP Support/Standard Equipment Plan SEP SOSUS Estimated Position SEP Schema-Evolution Pattern SEP School Effectiveness Profile (UK) SEP System Evaluation Plan SEP Signal Entry Panel SEP Service de l'Enseignement Prive (French: Service of Private Teaching, Geneva) SEP Security Evaluation Program SEP Secure Exchange Protocol SEP Secretariado de Estudios Propios SEP Syndicat de l'Education Populaire (French: Union of Popular Education) SEP Strathclyde European Partnership Ltd (UK) SEP Software Enhancement Proposal SEP Systematic Evaluation Program SEP Swine Enzootic Pneumonia (mycoplasmosis) SEP Scorched Earth Productions SEP Sanctuary Education Panel (NOAA) SEP Software Entwicklungs Praktikum SEP Secretaría Ejecutiva de la Presidencia (Spanish) SEP Selsius Ethernet Phone SEP Severely Errored Period SEP Société d'Equipement du Poitou (French: Equipment Corporation of Poitou) SEP Special Energy Programme (Kenya) SEP Swiss Expert Pool (for Civilian Peacebuilding) SEP Standard Error Prediction SEP Satellite Education Program SEP Safety and Emergency Procedure SEP Société d'Encouragement au Progrès SEP Sequence Endpoint SEP Science Entrepreneurship Program (Case Western Reserve University) SEP Software End Product SEP Safety Evaluation Panel SEP Safety Evaluation for Packaging SEP Selective Employment Plan SEP Service Engineering Process SEP Spherical Error of Probability SEP Strain Energy Partitioning SEP Synthetic Environment Program SEP System Enhancement Proposal SEP Simultaneous Examination Program (US IRS) SEP Spanning Explorer Packet (Cisco) SEP Service Execution Plan SEP Software Execution Platform SEP Solar Electron Package SEP Solar Energetics Package SEP Somebody's Elses Problem SEP Site Evaluation Panel SEP Shipbuilders' Estimating Package SEP Selectively Enhanced Polymer SEP Scientific & Engineering Personnel SEP Strategic Execution Planning SEP Stable Element Panel SEP Support/Standard Equipment Plan SEP SOSUS Estimated Position SEP Schema-Evolution Pattern SEP School Effectiveness Profile (UK) Something Else Perhaps? |
David Brown <david.brown@hesbynett.no>: Aug 22 09:54AM +0200 On 22/08/16 08:48, Christian Gollwitzer wrote: > much more versatile handling. Evolving additional arms is very hard, > repurposing the existing ones is easier. Who knows, give birds another > 100 million years, and they might develop higher intelligence as well. Some birds /are/ surprisingly intelligent, and also use tools. Look on youtube - there are lots of videos there. But in order to evolve further up that line (assuming a similar tool using and intelligence evolutionary loop to humans), they would have to learn to use their "hands" for tools - beaks and feet are too limited. And since that means losing the use of their wings, it is not going to happen by incremental evolution. It would take a truly extraordinary random genetic mutation - perhaps something that turned off the "wing" genes and re-activated dormant "dinosaur arm" genes, so that they could start along a new path. |
David Brown <david.brown@hesbynett.no>: Aug 22 09:55AM +0200 On 22/08/16 09:41, Ike Naar wrote: >> in your country), it will all be an SEP. > I'm not good at acronyms. What kind of SEP are you talking about? > SEP Somebody Else's Problem (Douglas Adams, Hitchhiker's Triology) It's a really useful phrase for any programmer to know! > Something Else Perhaps? :-) |
m.labanowicz@gmail.com: Aug 21 11:30PM -0700 > https://gcc.gnu.org/onlinedocs/cpp/Stringification.html 'WARN_IF' macro from above link is buggy, example: { int x = 0; int s = 7; WARN_IF ((x%s) == 0); /* it makes fprintf(stderr, "Warning: (x%s) == 0\n") */ /* where %s is a special marker for printf */ } Better is to use 'fputs': #define WARN_IF(EXP) \ do { if (EXP) \ fputs ("Warning: " #EXP "\n", stderr); } \ while (0) |
David Brown <david.brown@hesbynett.no>: Aug 22 08:49AM +0200 > WARN_IF ((x%s) == 0); /* it makes fprintf(stderr, "Warning: (x%s) == 0\n") */ > /* where %s is a special marker for printf */ > } The problem could be avoided here if you used sensible spacing around the % operator. But the principle is right. > do { if (EXP) \ > fputs ("Warning: " #EXP "\n", stderr); } \ > while (0) That sounds reasonable. You can do even better, however: extern void __attribute__((error("WARN_IF always triggered"))) warnIfAlwaysTriggered(void); #define WARN_IF(EXP) \ do { \ if (__builtin_constant_p(EXP)) { \ if (EXP) { \ warnIfAlwaysTriggered(); \ } \ } \ if (EXP) { \ fputs ("Warning: " #EXP "\n", stderr); \ } \ } while (0) Then you get a compile-time error as well, if the compiler can see that the warning is always going to be triggered - as that will almost certainly mean a program bug. __builtin_constant_p and the error __attribute__ are, of course, gcc-isms, but the reference was to a page in the gcc manual about stringification. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment