IT201800004297A1 - METHOD FOR AUTOMATIC TESTING OF THE ERROR CONDITIONS OF SOFTWARE PROGRAMS - Google Patents
METHOD FOR AUTOMATIC TESTING OF THE ERROR CONDITIONS OF SOFTWARE PROGRAMS Download PDFInfo
- Publication number
- IT201800004297A1 IT201800004297A1 IT102018000004297A IT201800004297A IT201800004297A1 IT 201800004297 A1 IT201800004297 A1 IT 201800004297A1 IT 102018000004297 A IT102018000004297 A IT 102018000004297A IT 201800004297 A IT201800004297 A IT 201800004297A IT 201800004297 A1 IT201800004297 A1 IT 201800004297A1
- Authority
- IT
- Italy
- Prior art keywords
- code
- error
- lines
- point
- software
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 17
- 238000012360 testing method Methods 0.000 title claims description 8
- 238000003780 insertion Methods 0.000 claims 3
- 230000037431 insertion Effects 0.000 claims 3
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Description
DESCRIZIONE DESCRIPTION
METODO PER IL TEST AUTOMATICO DELLE CONDIZIONI DI ERRORE DI METHOD FOR THE AUTOMATIC TEST OF THE ERROR CONDITIONS OF
PROGRAMMI SOFTWARE SOFTWARE PROGRAMS
SETTORE TECNICO TECHNICAL FIELD
Il metodo proposto dalla seguente invenzione permette di testare in modo automatico le condizioni di errore di una applicazione software che utilizzi la tecnologia delle cosiddette "trappole di errore" The method proposed by the following invention allows to automatically test the error conditions of a software application that uses the technology of the so-called "error traps"
STATO DELL'ARTE STATE OF THE ART
Ipotizzando il programma software suddiviso in sottoprogrammi, chiamati routine o metodi, come è universalmente adottato nei linguaggi dalla IV generazione in poi, metodi che si contraddistinguono per un nome o firma che viene richiamato da altre parti del programma con tutta una serie di parametri variabili. Assuming the software program is divided into subprograms, called routines or methods, as it is universally adopted in languages from generation IV onwards, methods that are characterized by a name or signature that is called up from other parts of the program with a whole series of variable parameters.
Le applicazione o programmi software possono, in ogni riga del codice che viene elaborato, affrontare una condizione di errore in cui il programma non è in grado di andare avanti, per esempio la divisione di u numero in cui il divisore abbia valore zero. Software applications or programs may, in each line of code being processed, face an error condition in which the program is unable to move forward, for example the division of u number where the divisor has a value of zero.
Nei linguaggi dalla IV generazione questo salto nel buio viene inquadrato verso un salto su particolari righe di codice dove viene inserito un messaggio codificato di errore o altro codice gestito dal programmatore. Per i linguaggi eredi del C si ha, all'interno di ogni routine o metodo, il costrutto TRY (metti sotto osservazione questo gruppo di righe di codice) e CATCH, seguito da un gruppo di righe di codice. Quando una riga di codice appartenente al gruppo sotto osservazione TRY va in un qualsiasi errore, l'elaborazione del programma salta nel gruppo di righe di codice del costrutto CATCH elaborandole sequenzialmente. In Generation IV languages this leap in the dark is framed towards a jump on particular lines of code where a coded error message or other code managed by the programmer is inserted. For languages inheriting C we have, within each routine or method, the construct TRY (observe this group of lines of code) and CATCH, followed by a group of lines of code. When a line of code belonging to the group under observation TRY goes into any error, the processing of the program jumps into the group of lines of code of the CATCH construct, processing them sequentially.
SINTESI DELL'INVENZIONE SUMMARY OF THE INVENTION
Il codice sorgente viene rielaborato aggiungendovi righe di codice utili solo per il test delle condizioni di errore: Non importa quale errore sia generato, in quanto le righe di codice del costrutto CATCH sono universali per tutte le condizioni di errore. Si riscrive quindi il codice sorgente inserendo manualmente il costrutto TRY CATCH su tutte le routine o metodi del programma. Questa operazione preliminare del programmatore permette di attivare la metodologia descritta dalla seguente invenzione in modo automatico con un apposito software che legge il codice sorgente e lo restituisce modificato. The source code is reworked by adding lines of code that are useful only for testing error conditions: It doesn't matter which error is generated, as the CATCH lines of code are universal for all error conditions. The source code is then rewritten by manually inserting the TRY CATCH construct on all the routines or methods of the program. This preliminary operation of the programmer allows to activate the methodology described by the following invention automatically with a special software that reads the source code and returns it modified.
Viene quindi inserito in automatico, all'inizio di ogni routine o metodo, dopo il costrutto TRY, una riga con un errore noto, ad esempio la già citata divisione per zero, e quindi, alla fine del gruppo di righe di codice del costrutto CATCH del codice che annulla la condizione di errore, per esempio rivalorizzare la variabile che era zero con un valore diverso da zero, e quindi richiamare lo stesso metodo o routine in modalità ricorsiva. It is then inserted automatically, at the beginning of each routine or method, after the TRY construct, a line with a known error, for example the aforementioned division by zero, and then, at the end of the group of lines of code of the CATCH construct some code that clears the error condition, for example re-evaluating the variable that was zero with a non-zero value, and then calling the same method or procedure in recursive mode.
Ovviamente la divisione per zero è solo un esempio, la metodologia della presente invenzione prevede semplicemente che nel costrutto TRY venga inserito un errore noto e che nel costrutto CATCH, prima di richiamare la routine in modalità ricorsiva questo errore venga risolto in modo da far funzionare il programma nella modalità senza errori. Vantaggiosamente questo test viene effettuato quando gli errori veri del programma sono già stati corretti. La metodologia è applicabile a tutti i software sviluppati con linguaggi che utilizzino la tecnologia della "trappola dell'errore" che solo in alcuni linguaggi si chiama "CATCH", Obviously the division by zero is just an example, the methodology of the present invention simply provides that a known error is inserted in the TRY construct and that in the CATCH construct, before calling the routine in recursive mode this error is resolved in order to make the program in error-free mode. Advantageously, this test is carried out when the true errors of the program have already been corrected. The methodology is applicable to all software developed with languages that use the technology of the "error trap" which only in some languages is called "CATCH",
BREVE DESCRIZIONE DEI DISEGNI BRIEF DESCRIPTION OF THE DRAWINGS
Nella figura 1 possiamo distinguere: In figure 1 we can distinguish:
INIZIO ROUTINE START ROUTINE
COSTRUTTO TRY BUILT TRY
RIGHE DI CODICE INSRITE CON ERRORE NOTO (1) LINES OF CODE INSERTED WITH KNOWN ERROR (1)
COSTRUTTO CATCH BUILT CATCH
RIGHE DI CODICE INSERITE CON RIPRISTINO ERRORE NOTO (2) CODE LINES INSERTED WITH KNOWN ERROR RESET (2)
RICHAMO RICORSIVO INIZIO ROUTINE (3) RECURRING REQUEST START ROUTINE (3)
Nella elaborazione quando il programma trova (2) salta ne costrutto CATCH, elabora tutte le righe del costrutto CATCH e quindi trova (2) che annulla la condizione di errore (1), quindi con le istruzioni (3) ritorna a inizio routine elaborando il codice sorgente senza errori aggiunti. In the processing, when the program finds (2) it jumps into the CATCH construct, processes all the lines of the CATCH construct and then finds (2) which cancels the error condition (1), then with the instructions (3) it returns to the start of the routine processing the source code with no added errors.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
IT102018000004297A IT201800004297A1 (en) | 2018-04-09 | 2018-04-09 | METHOD FOR AUTOMATIC TESTING OF THE ERROR CONDITIONS OF SOFTWARE PROGRAMS |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
IT102018000004297A IT201800004297A1 (en) | 2018-04-09 | 2018-04-09 | METHOD FOR AUTOMATIC TESTING OF THE ERROR CONDITIONS OF SOFTWARE PROGRAMS |
Publications (1)
Publication Number | Publication Date |
---|---|
IT201800004297A1 true IT201800004297A1 (en) | 2019-10-09 |
Family
ID=62952206
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
IT102018000004297A IT201800004297A1 (en) | 2018-04-09 | 2018-04-09 | METHOD FOR AUTOMATIC TESTING OF THE ERROR CONDITIONS OF SOFTWARE PROGRAMS |
Country Status (1)
Country | Link |
---|---|
IT (1) | IT201800004297A1 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6820251B1 (en) * | 2000-11-06 | 2004-11-16 | Hewlett-Packard Development Company, L.P. | System and method for a software recovery mechanism |
US20070162246A1 (en) * | 2006-01-06 | 2007-07-12 | Roland Barcia | Exception thrower |
-
2018
- 2018-04-09 IT IT102018000004297A patent/IT201800004297A1/en unknown
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6820251B1 (en) * | 2000-11-06 | 2004-11-16 | Hewlett-Packard Development Company, L.P. | System and method for a software recovery mechanism |
US20070162246A1 (en) * | 2006-01-06 | 2007-07-12 | Roland Barcia | Exception thrower |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Xu et al. | Regression test selection for AspectJ software | |
CN106469049B (en) | File scanning method and device | |
Fedyukovich et al. | eVolCheck: Incremental upgrade checker for C | |
CN103440337A (en) | API (application program interface) compatibility scanning method and API compatibility scanning device | |
CN112685315A (en) | C-source code-oriented automatic formal verification tool and method | |
Santelices et al. | DUA-Forensics: a fine-grained dependence analysis and instrumentation framework based on Soot | |
US20090249285A1 (en) | Automatic Generation of Run-Time Instrumenter | |
JP2022052734A (en) | Automated generation of software patch | |
IT201800004297A1 (en) | METHOD FOR AUTOMATIC TESTING OF THE ERROR CONDITIONS OF SOFTWARE PROGRAMS | |
Kreutzer et al. | Language-agnostic generation of compilable test programs | |
Campinhos et al. | Type-safe evolution of web services | |
Chittimalli et al. | GEMS: a generic model based source code instrumentation framework | |
DE102019105418B3 (en) | Method for generating a representation of program logic, decompiling device, recompiling system and computer program products | |
CN106649118B (en) | A kind of generation method of the Java code SSA single path based on AST | |
US11119740B2 (en) | Parsability of code snippets | |
CN103488519A (en) | Implement method of interactive scripting language interpreter | |
Kim et al. | Code transformation issues in move-instance-method refactorings | |
Amyot et al. | Structural Coverage for Lotos: A Probe Insertion Technique | |
CN111459808A (en) | Type inference-based guided test case variation method | |
Olderog | A characterization of Hoare's logic for programs with Pascal-like procedures | |
CN117520191B (en) | Test completeness checking method, device and storage medium based on program path | |
Bernardi et al. | An interprocedural aspect control flow graph to support the maintenance of aspect oriented systems | |
Gül et al. | Mutative Fuzzing for an Assembler Compiler. | |
CN111026401A (en) | Mobile terminal thermal restoration method | |
IT201800008072A1 (en) | Optimized method of debugging and testing software programs |