Isolated testing of distributed development projects
AssigneeSap SE
InventorsDimitar Tenev, Petar Skelin, Inbal Zilberman
Life of this patent
Estimating the term…
Abstract
Computer systems and methods for isolated testing of distributed development projects to enable test-driven development are described. In one aspect, a build of the distributed project is generated based on locally available resources. A number of unit tests are identified related to program code developed locally as part of the distributed project. In another aspect, the unit tests are parsed to identify dependencies for executing the unit tests and the related program code. A mock interface is instantiated to handle the dependencies related to resources that are not available locally. In yet another aspect, the unit tests are executed by a local script engine, and a result is generated by a script testing framework.
Claims15
A computer implemented method to perform isolated test driven development, the method comprising:
- creating a local build of a distributed development project at a user computer system based on locally stored resources;
- instantiating a first testing framework to test project source code of the local build of the distributed development project at the user computer system;
- creating a mocking framework to locally substitute at least one external resource required for testing of the project source code at the user computer system;
- extending the first testing framework with a script engine to execute script code at the user computer system to test the project source code;
- integrating, at the user computer system, the script engine with a second testing framework to interpret a result of execution of the script code;
- loading a plurality of script code unit tests associated with the local build of the distributed development project at the user computer system;
- based on the plurality of script code unit tests, identifying a plurality of local project source code units by reading metadata from the plurality of script code unit tests specifying a plurality of dependencies of the plurality of local project source code units, wherein the plurality of dependencies specify at least one external resource of the distributed development project, required for running at least one of the plurality of script code unit tests, the at least one external resource is stored outside the user computer system;
- running the plurality of script code unit tests over the plurality of local project source code units at the extended first testing framework;
- and
- in the second testing framework, generating a report based on the running of the plurality of script code unit tests.
A non-transitory computer readable medium storing instructions, which when executed by at least one processor cause a computer system to perform operations comprising:
- creating a local build of a distributed development project at the computer system based on locally stored resources;
- instantiating a first testing framework to test project source code of the local build of the distributed development project at the computer system;
- instantiating a mocking framework to locally substitute at least one external resource required for testing of the project source code at the computer system;
- extending the first testing framework with a script engine to execute script code at the computer system to test the project source code;
- integrating, at the computer system, the script engine with a second testing framework to interpret a result of execution of the script code;
- loading a plurality of script code unit tests associated with the local build of the distributed development project;
- based on the plurality of script code unit tests, identifying a plurality of local project source code units by reading metadata from the plurality of script code unit tests specifying a plurality of dependencies of the plurality of local project source code units, wherein the plurality of dependencies specify at least one external resource of the distributed development project to be handled by the mocking framework during the execution of the plurality of script code unit tests, the at least one external resource is stored outside the computer system;
- executing the plurality of script code unit tests over the plurality of local project source code units by the script engine;
- and
- in the second testing framework, generating a report based on a result of the execution of the plurality of script code unit tests.
A computer system to perform isolated testing of distributed development projects, the system comprising:
- a memory that stores instructions;
- and
- a processor that executes the instructions stored in the memory to create a local build of a distributed development project at the computer system based on locally available resources;
- a first testing framework that tests project source code of the local build of the distributed development project at the computer system, wherein the first testing framework loads a plurality of script code unit tests associated with the local build of the development project, wherein the plurality of script code unit tests is loaded by reading metadata from the plurality of script code unit tests specifying a plurality of dependencies, and wherein the plurality of dependencies specify a plurality of external resources required for executing the plurality of script code unit tests, the plurality of external resources are stored outside the computer system;
- a mocking framework that substitutes at least one external resource of the plurality of external resources required for testing of the project source code locally at the computer system;
- a script engine that extends the first testing framework to execute the script code unit tests in the computer system to test the project source code;
- and
- a second testing framework integrated with the script engine at the computer system that interprets a result of execution of at least one of the plurality of script code unit tests.
Dependencies are inferred from the claim text.