Test framework via language server protocol

Connecting the IDE to the test framework through LSP enables the sharing of test results between different IDEs, which solves the problem in the existing technology that each IDE needs to test the framework independently, and improves development efficiency and consistency of cross-tool language support.

CN118838801APending Publication Date: 2024-10-25SAP SE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311075282.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-04-25
Filing Date
2023-08-24
Publication Date
2024-10-25

AI Technical Summary

Technical Problem

In existing integrated development environments (IDEs), the function of calling out the test framework needs to be created independently for each IDE, which results in time-consuming implementation, reduces the number of supported editor/test framework combinations, and lacks support across different tool languages. Consistency and quality.

Method used

Connect the IDE to the test framework through the Language Server Protocol (LSP), use custom code actions to obtain feedback from the test framework, and pass the feedback to the IDE through the LSP, allowing different IDEs to share a single test framework and achieve cross-IDE test result reporting.

Benefits of technology

It realizes the sharing of test framework results between different IDEs, reduces the need for independent test framework development for each IDE, improves the consistency and quality of language support across different tools, and simplifies the development process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118838801A_ABST
    Figure CN118838801A_ABST
Patent Text Reader

Abstract

In example embodiments, a language server protocol (LSP) is used to connect an IDE to a test framework via a shared language server. More specifically, the shared language server is modified to permit feedback about test results from the test framework to be transmitted to the IDE, either directly via a code action that supports direct feedback, or indirectly by having the language server write the test results to the IDE as code annotations within the software code itself. As a result, developers using completely different IDEs can use a single test framework without the need to develop a separate test framework for each IDE.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document generally relates to computer software application development. More specifically, this document relates to running a test framework using the Language Server Protocol. Background Art

[0002] Computer software can be written using an integrated development environment (IDE), which is a software application that provides developers with a complete set of tools for writing, testing, and debugging code. An IDE typically includes a code editor, a compiler or interpreter, a debugger, and other tools that help developers automate common tasks and streamline their workflow. Summary of the invention

[0003] One aspect of the present disclosure provides a system, including: at least one hardware processor; and a computer-readable medium storing instructions, which, when executed by the at least one hardware processor, causes the at least one hardware processor to perform operations including: receiving, at a language server, a command from a first integrated development environment (IDE) via a language server protocol (LSP) to run a first test of a first test framework on software code in the first IDE; running the first test of the first test framework by communicating with the first test framework using the LSP; receiving feedback from the first test framework via the LSP, the feedback including one or more results of executing the first test on the software code; and reporting information about the feedback to the first IDE via the LSP.

[0004] In one example, the command is a command to execute a code action of the language server.

[0005] In one example, reporting information about the feedback includes writing information representing the feedback as an annotation code into the software code.

[0006] In one example, the code action is a custom code action that defines one or more custom parameters, the one or more custom parameters being used to pass information representing feedback to the first IDE.

[0007] In one example, information in the one or more custom parameters is presented in a graphical user interface element at the first IDE.

[0008] In one example, the operation also includes: receiving a command from a second IDE to run a first test of a first test framework on the software code in the second IDE, wherein the command is received at the language server via the LSP; running the first test of the first test framework on the software code by the second IDE, wherein the second IDE communicates with the first test framework using the LSP; receiving feedback from the first test framework via the LSP regarding running the first test on the software code by the second IDE; and reporting information regarding the feedback regarding running the first test on the software code by the second IDE, wherein the information is reported to the second IDE via the LSP.

[0009] In one example, the command includes a request to run the first test in debug mode, and wherein running the first test of the first test framework by communicating with the first test framework using the LSP includes attaching a debugger to the first test using a debug adapter protocol (DAP).

[0010] Another aspect of the present disclosure provides a method, including: at a language server, receiving a command from a first integrated development environment (IDE) via a language server protocol (LSP) to run a first test of a first test framework on software code in the first IDE; running the first test of the first test framework by communicating with the first test framework using the LSP; receiving feedback from the first test framework via the LSP, the feedback including one or more results of executing the first test on the software code; and reporting information about the feedback to the first IDE via the LSP.

[0011] In one example, the command is a command to execute a code action of the language server.

[0012] In one example, reporting information about the feedback includes writing information representing the feedback as an annotation code into the software code.

[0013] In one example, the code action is a custom code action that defines one or more custom parameters, the one or more custom parameters being used to pass information representing feedback to the first IDE.

[0014] In one example, information in the one or more custom parameters is presented in a graphical user interface element at the first IDE.

[0015] The above method also includes: receiving a command from a second IDE to run a first test of a first test framework on the software code in the second IDE, wherein the command is received at the language server via the LSP; running the first test of the first test framework on the software code by the second IDE, wherein the second IDE communicates with the first test framework using the LSP; receiving feedback from the first test framework via the LSP regarding the running of the first test on the software code by the second IDE; and reporting information regarding the feedback regarding the running of the first test on the software code by the second IDE, wherein the information is reported to the second IDE via the LSP.

[0016] In one example, the command includes a request to run the first test in debug mode, and wherein running the first test of the first test framework by communicating with the first test framework using the LSP includes attaching a debugger to the first test using a debug adapter protocol (DAP).

[0017] Another aspect of the present disclosure provides a non-transitory machine-readable medium storing instructions, which, when executed by one or more processors, causes the one or more processors to perform operations including: receiving a command from a second IDE to run a first test of a first test framework on software code in the second IDE, wherein the command is received at a language server via an LSP; running the first test of the first test framework on the software code by the second IDE, wherein the second IDE communicates with the first test framework using the LSP; receiving feedback from the first test framework regarding the running of the first test on the software code by the second IDE via the LSP; and reporting information regarding the feedback regarding the running of the first test on the software code by the second IDE, wherein the information is reported to the second IDE via the LSP.

[0018] In one example, the command is a command to execute a code action of the language server.

[0019] In one example, reporting information about the feedback includes writing information representing the feedback as an annotation code into the software code.

[0020] In one example, the code action is a custom code action that defines one or more custom parameters, the one or more custom parameters being used to pass information representing feedback to the first IDE.

[0021] In one example, information in the one or more custom parameters is presented in a graphical user interface element at the first IDE.

[0022] In one example, the operation also includes: receiving a command from a second IDE to run a first test of a first test framework on the software code in the second IDE, wherein the command is received at the language server via the LSP; running the first test of the first test framework on the software code by the second IDE, wherein the second IDE communicates with the first test framework using the LSP; receiving feedback from the first test framework via the LSP regarding running the first test on the software code by the second IDE; and reporting information regarding the feedback regarding running the first test on the software code by the second IDE, wherein the information is reported to the second IDE via the LSP. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The present disclosure is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings in which like references indicate similar elements.

[0024] Figure 1 is a block diagram illustrating a system for implementing a test framework via a language service protocol (LSP) according to a first example embodiment.

[0025] Figure 2 is a block diagram illustrating a system for implementing a test framework via an LSP according to a second example embodiment.

[0026] Figure 3 is a block diagram illustrating a system for implementing a test framework via an LSP according to a third example embodiment.

[0027] Figure 4 is a block diagram illustrating a system for implementing a test framework via an LSP according to a fourth example embodiment.

[0028] Figure 5 is a flow chart illustrating a method 500 for operating a language server according to an example embodiment.

[0029] Figure 6 is a block diagram illustrating a software architecture that may be installed on any one or more of the devices described above.

[0030] Figure 7 A diagram is shown of a machine in the form of a computer system within which a set of instructions, for causing the machine to perform any one or more of the methodologies discussed herein, may be executed according to an example embodiment. DETAILED DESCRIPTION

[0031] The following description discusses illustrative systems, methods, techniques, instruction sequences, and computer program products. In the following description, for the purpose of explanation, a number of specific details are set forth to provide an understanding of various example embodiments of the present subject matter. However, it is clear to those skilled in the art that various example embodiments of the present subject matter may be practiced without these specific details.

[0032] In an example embodiment, a solution to a technical problem encountered in an IDE is provided.

[0033] An IDE includes a series of components that software developers use when developing computer software. These components can include, for example:

[0034] Code Editor: An IDE provides a text editor with features such as syntax highlighting, code completion, and code formatting to help developers write code quickly and efficiently.

[0035] Compiler or Interpreter: IDEs usually come with a compiler or interpreter for the programming language used, which can help catch bugs and improve code quality.

[0036] Debugger: The IDE provides a debugger that allows developers to step through their code line by line, set breakpoints, and inspect variables and memory during runtime.

[0037] Build and deployment tools: IDEs often come with tools that automate the build and deployment process, allowing developers to easily package and distribute their applications.

[0038] Integration with Version Control: IDEs often integrate with version control systems such as Git, allowing developers to more easily manage changes to their code base.

[0039] Software developers also create test frameworks to test their code. A test framework is a collection of guidelines, coding standards, and libraries that provide a structured approach to testing software. It is a tool that helps developers and quality assurance professionals automate the process of writing, executing, and reporting tests. A test framework typically includes the following components:

[0040] (1) Test runner: A tool that executes test cases and reports the results.

[0041] (2) Test data: input data required to execute the test case.

[0042] (3) Test fixture: setup and teardown code executed before and after each test case.

[0043] (4) Assertion: Code that checks expected results against actual results.

[0044] Typically, integrations that invoke the functionality of a test framework must be created independently for each IDE. In other words, an integration designed for a first IDE will not work for a second IDE. For example, the VSCode JavaScript Jest runner / debugger is completely different from the Neovim JavaScript Jest runner / debugger. This results in a very time-consuming implementation and therefore reduces the total number of supported editor / test framework combinations.

[0045] In an example embodiment, a Language Server Protocol (LSP) is used to connect an IDE to a test framework via a shared language server. More specifically, the shared language server is modified to permit feedback about test results from the test framework to be transmitted to the IDE, either directly via code actions that support direct feedback, or indirectly by having the language server write the test results to the IDE as code comments within the software code itself. As a result, developers using completely different IDEs can use a single test framework without the need to develop a separate test framework for each IDE.

[0046] LSP is a communication protocol that facilitates the integration of language specific tools such as editors, integrated development environments (IDEs), and other code related tools. One such LSP is the Language Server Protocol (LSP) developed by Microsoft Corporation of Redmond, Washington. The LSP developed by Microsoft Corporation is a specific open source protocol, but for the purposes of this disclosure, the term LSP is intended to be broadly interpreted to refer to any language server protocol, not just to the LSP developed by Microsoft Corporation.

[0047] LSP enables editors and other tools to interact with language-specific tools through standardized interfaces, which helps improve the consistency and quality of language support across different tools.

[0048] LSP provides a common protocol for communication between language servers and clients (such as editors or IDEs). The language server provides information about the code to the client, such as syntax highlighting, code completion, and error checking, while the client provides information about the code being edited to the language server, such as changes to the code, cursor position, and current selection.

[0049] Using LSP, the IDE can call code actions in the language server to make the language server make calls to perform certain functions. For example, code actions can modify the code (e.g., rename functions, change structures, etc.) or navigate to a specific part of the code (e.g., definition, implementation).

[0050] As previously mentioned, in an example embodiment, LSP is modified to allow the connection between IDE and test framework. There are several different implementation embodiments that can be used to achieve this. In a first example embodiment, a custom code action of a language server utilizing LSP is created. This custom code action can be called in the same manner as a non-custom code action, but the custom code action is specially designed to obtain feedback (e.g., test pass, test failure, (multiple) specific test scores, etc.) from the test framework referenced in the call and communicate the feedback to the calling IDE via one or more custom parameters. Then, one or more custom parameters can be used by the calling IDE to present a special display (e.g., a pop-up window, a sidebar, etc.) that indicates feedback to the user.

[0051] In the second example embodiment, non-custom code actions that have been established in the language server are used to obtain feedback. As in the first example embodiment, the same type of feedback can be obtained from the referenced test framework, but instead of defining one or more custom parameters to return feedback, the feedback is written directly into the code within the IDE as comment code. Comment code is code with some special symbols that indicate that the comment code cannot be compiled or interpreted. Programmers usually use it to enter comments / descriptions about what function the corresponding part of the uncommented code is performing. However, in this case, the comment code is used to report feedback from the test framework.

[0052] In either the first or second example embodiments, the communication between the language server and the test framework(s) is performed via the LSP.

[0053] Figure 1 1 is a block diagram illustrating a system for implementing a test framework via an LSP according to a first example embodiment. Here, a first IDE 100 communicates with a first language server 102 via an LSP. The communication may include a request to run one or more tests from a test framework, such as test framework 104A or test framework 104B. It is worth noting that there is an option for the first IDE 100 to run tests from any test framework 104A, 104B connected to the first language server 102. This is because the first language server 102 is connected to the test frameworks 104A, 104B via an LSP.

[0054] More specifically, in the first example embodiment, the first IDE 100 invokes a custom code action 106C, despite the presence of one or more non-custom code actions 106A, 106B within the first language server 102. The custom code action is used to interpret the call and, based on the content of the call from the first IDE 100, specifically identify which test framework 104A, 104B and which test within the test framework 104A, 104B to invoke. For example, the call from the first IDE 100 may specify that test #1 in the test framework 104A should be run (or at least provide a cursor position that allows the LSP server to identify the nearest test). In this case, the custom code action 106C invokes test #1 in the test framework 104A and receives feedback from the test framework 104A indicating the results of running test #1. This feedback may then be included in one or more customization parameters passed from the first language server 102 back to the first IDE 100 , which may then render or otherwise display the feedback (or a summary thereof) via some specialized graphical user interface (GUI) element 108 .

[0055] Similar functionality may be implemented for the second IDE 110 , which may communicate with a separate second language server 112 , which may itself communicate with one or more test frameworks (including test frameworks 104A, 104B, and one or more test frameworks 104C that are not in communication with the first language server 102 ).

[0056] Figure 2 2 is a block diagram illustrating a system for implementing a test framework via an LSP according to a second example embodiment. Here, a first IDE 200 communicates with a first language server 202 via an LSP. The communication may include a request to run one or more tests from a test framework, such as test framework 204A or test framework 204B. It is worth noting that there is an option for the first IDE 200 to run tests from any test framework 204A, 204B connected to the first language server 202. This is because the first language server 202 is connected to the test frameworks 204A, 204B via an LSP.

[0057] More specifically, in the second example embodiment, the non-custom code action 206A is called by the first IDE 200. The non-custom code action 206A is used to interpret the call and, based on the content of the call from the first IDE 200, specifically identify which test framework 204A, 204B to call and which test within the test framework 204A, 204B. For example, the call from the first IDE 200 may specify that test #1 in the test framework 204A should be run. In this case, the non-custom code action 206A calls test #1 in the test framework 204A and receives feedback from the test framework 204A indicating the result of running test #1. Because the non-custom code action 206A is non-custom, it does not provide a function for custom parameters. In this way, the non-custom code action 206A writes the feedback (or its summary) as an annotation code into the corresponding code in the first IDE 200. Then, the user can view the feedback in this annotation code.

[0058] Similar functionality may be implemented for the second IDE 210 , which may communicate with a separate second language server 212 , which may itself communicate with one or more test frameworks (including test frameworks 204A, 204B, and one or more test frameworks 204C that are not in communication with the first language server 202 ).

[0059] It is worth noting that in the above two embodiments, each IDE has a different corresponding language server. In some example embodiments, multiple IDEs can share a single language server. This can be achieved in one of two ways. One way is to have a single language server have a different set of code actions corresponding to each connected IDE. Therefore, the first IDE will only call the code actions associated with the first IDE, and will not call the code actions associated with the second IDE, although both code actions exist on the same language server. Another way is to have a language detection component in a single language server, which detects the language of the file passed to it in the call from the IDE, and parses the file into an abstract syntax tree (AST) that can be used by the code action, regardless of the original language of the file. This parsing can be performed via, for example, a parser generator tool (such as Tree-sitter).

[0060] Figure 3304A, 304B. 304B is a block diagram illustrating a system for implementing a test framework via an LSP according to a third example embodiment. The third example embodiment is similar to the first example embodiment, except that multiple IDEs 300A, 300B share a single language server 302. One of the IDEs 300A, 300B attempts to communicate with the language server 302 via the LSP. The communication may include a request to run one or more tests from a test framework (such as test framework 304A or test framework 304B). It is noteworthy that for either of the IDEs 300A, 300B, there is an option to run tests from either of the test frameworks 304A, 304B connected to the language server 302. This is because the language server 302 is connected to the test frameworks 304A, 304B via the LSP.

[0061] More specifically, in this third example embodiment, the IDE 300A, 300B calls a custom code action 306C, despite the presence of one or more non-custom code actions 306A, 306B within the language server 302. The custom code action is used to interpret the call and, based on the content of the call from the IDE 300A, 300B, specifically identify which test framework 304A, 304B to call and which test within the test framework 304A, 304B. For example, the call from the IDE 300A, 300B may specify that test #1 in the test framework 304A should be run. In this case, the custom code action 306C calls test #1 in the test framework 304A and receives feedback from the test framework 304A indicating the results of running test #1. The feedback can then be included in one or more custom parameters passed back to the IDE 300 from the first language server 302, and the IDE 300A can then present or otherwise display the feedback (or a summary thereof) via some specialized graphical user interface element 308.

[0062] Figure 4 404B. 404A is a block diagram illustrating a system for implementing a test framework via an LSP according to a fourth example embodiment. Here, one or more IDEs 400A, 400B communicate with a language server 402 via an LSP. The communication may include a request to run one or more tests from a test framework, such as test framework 404A or test framework 404B. It is noteworthy that for the IDEs 400A, 400B, there is an option to run tests from any test framework 404A, 404B connected to the language server 402. This is because the language server 402 is connected to the test framework 404A, 404B via an LSP.

[0063] More specifically, in the second example embodiment, non-custom code action 406A is called by IDE 400A, 400B. Non-custom code action 406A is used to interpret the call and specifically identify which test framework 404A, 404B to call and which test within the test framework 404A, 404B based on the content of the call from the calling IDE 400A, 400B. For example, the call from IDE 400A, 400B can specify that test #1 in test framework 404A should be run. In this case, non-custom code action 406A calls test #1 in test framework 404A and receives feedback indicating the running result of test #1 from test framework 404A. Because non-custom code action 406A is non-custom, it does not provide a function of custom parameters. In this way, non-custom code action 406A writes feedback (or its summary) as comment code into the corresponding code in corresponding IDE 400A, 400B. Then, the user can view the feedback in this comment code.

[0064] In a further example embodiment, an optional debugging function can be provided. Here, the user can choose to run the test in debug mode. Running in debug mode allows the user to view additional information about the operation of the code segment, such as the variable values ​​of (multiple) tests in the code being run. However, to achieve this in the context of a language server, it is technically challenging because there is currently no mechanism for having a debugging function in a language-agnostic manner. Therefore, in this further example embodiment, the debug adapter protocol (DAP) is used. DAP is a communication protocol between a debugger and an integrated development environment (IDE) or a code editor. It provides a common language for debugging tools to exchange information about breakpoints, stepping, variable inspection, and other debugging operations.

[0065] When a user wishes to run tests in debug mode, they will have their corresponding IDE send a message to the language server, which will then start the tests in debug mode, which includes attaching a debugger using DAP.

[0066] Figure 5 5 is a flow chart illustrating a method 500 for running a language server according to an example embodiment. At operation 502, a language server receives a command from a first integrated development environment (IDE) via a language server protocol (LSP) to run a first test from a first test framework on software code in the first IDE. In some example embodiments, this may include a command to run the first test in debug mode.

[0067] In operation 504, the language server runs a first test from the first test framework by communicating with the first test framework using the LSP. The running of the first test includes executing a code action on the language server. This may be a non-custom code action or a custom code action. When feedback from the first test is reported to the first IDE, differences will be discovered.

[0068] Where the commands include a command to run the first test in debug mode, the language server may attach a debugger to the first test using the DAP.

[0069] At operation 506, feedback is received from the first test framework via the LSP, the feedback including one or more results of performing the first test on the software code. At operation 508, the feedback is reported to the first IDE via the LSP. In the case of a non-custom code action, the report may include writing information about the feedback as an annotation code into the code itself. In the case of a custom code action, the report may include passing information about the feedback to the first IDE via one or more custom parameters.

[0070] In view of the above disclosure, various examples are described below. It should be noted that one or more features of an example, whether isolated or in combination, should be considered within the disclosure of this application.

[0071] Example 1. A system comprising:

[0072] at least one hardware processor; and

[0073] A computer readable medium storing instructions, when the instructions are executed by at least one hardware processor, causes the at least one hardware processor to perform operations including:

[0074] receiving, at a language server, a command from a first integrated development environment (IDE) via a language server protocol (LSP) to run a first test from a first testing framework on software code in the first IDE;

[0075] running a first test from the first test framework by communicating with the first test framework using the LSP;

[0076] receiving feedback from the first test framework via the LSP, the feedback comprising one or more results of executing the first test on the software code; and

[0077] Information about the feedback is reported to the first IDE via the LSP.

[0078] Example 2. The system of Example 1, wherein the command is a command to execute a code action of a language server.

[0079] Example 3. The system of Example 2, wherein reporting information about the feedback comprises writing information representing the feedback into the software code as an annotation code.

[0080] Example 4. The system of Example 2, wherein the code action is a custom code action that defines one or more custom parameters, the one or more custom parameters being used to pass information representing feedback to the first IDE.

[0081] Example 5. The system of Example 4, wherein information in the one or more custom parameters is presented in a graphical user interface element at the first IDE.

[0082] Example 6. The system of any of Examples 1-5, wherein the operations further comprise:

[0083] receiving, at the language server, a command from the second IDE via the LSP to run a first test from the first testing framework on the software code in the second IDE;

[0084] running, by the second IDE, a first test from the first test framework on the software code by communicating with the first test framework using the LSP;

[0085] receiving feedback from the first test framework via the LSP regarding running the first test on the software code by the second IDE;

[0086] Information regarding feedback of running the first test on the software code by the second IDE is reported to the second IDE via the LSP.

[0087] Example 7. A system according to any of Examples 1-6, wherein the command includes a request to run the first test in debug mode, and wherein running the first test from the first test framework by communicating with the first test framework using the LSP includes attaching a debugger to the first test using a debug adapter protocol (DAP).

[0088] Example 8. A method comprising:

[0089] receiving, at a language server, a command from a first integrated development environment (IDE) via a language server protocol (LSP) to run a first test from a first testing framework on software code in the first IDE;

[0090] running a test from the first test framework by communicating with the first test framework using the LSP;

[0091] receiving feedback from the first test framework via the LSP, the feedback comprising one or more results of executing the first test on the software code; and

[0092] Information about the feedback is reported to the first IDE via the LSP.

[0093] Example 9. The method of Example 8, wherein the command is a command to execute a code action of a language server.

[0094] Example 10. The method of Example 9, wherein reporting information about the feedback comprises writing information representing the feedback into the software code as an annotation code.

[0095] Example 11. The method of Example 9, wherein the code action is a custom code action that defines one or more custom parameters, the one or more custom parameters being used to pass information representing feedback to the first IDE.

[0096] Example 12. The method of Example 11, wherein information in the one or more custom parameters is presented in a graphical user interface element at the first IDE.

[0097] Example 13. The method according to any one of Examples 8-12, further comprising:

[0098] receiving, at the language server, a command from the second IDE via the LSP to run a first test from the first testing framework on the software code in the second IDE;

[0099] running, by the second IDE, a first test from the first test framework on the software code by communicating with the first test framework using the LSP;

[0100] receiving feedback from the first test framework via the LSP regarding running the first test on the software code by the second IDE;

[0101] Information regarding feedback of running the first test on the software code by the second IDE is reported to the second IDE via the LSP.

[0102] Example 14. A method according to any of Examples 8-13, wherein the command includes a request to run the first test in debug mode, and wherein running the first test from the first test framework by communicating with the first test framework using the LSP includes attaching a debugger to the first test using a debug adapter protocol (DAP).

[0103] Example 15. A non-transitory machine-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:

[0104] receiving, at a language server, a command from a first integrated development environment (IDE) via a language server protocol (LSP) to run a first test from a first testing framework on software code in the first IDE;

[0105] running a first test from the first test framework by communicating with the first test framework using the LSP;

[0106] receiving feedback from the first test framework via the LSP, the feedback comprising one or more results of executing the first test on the software code; and

[0107] Information about the feedback is reported to the first IDE via the LSP.

[0108] Example 16. The non-transitory machine-readable medium of Example 15, wherein the command is a command to execute a code action of a language server.

[0109] Example 17. The non-transitory machine-readable medium of Example 16, wherein reporting information about the feedback comprises writing information representing the feedback as an annotation code into the software code.

[0110] Example 18. The non-transitory machine-readable medium of Example 16, wherein the code action is a custom code action that defines one or more custom parameters for passing information representing feedback to the first IDE.

[0111] Example 19. The non-transitory machine-readable medium of Example 18, wherein information in the one or more custom parameters is presented in a graphical user interface element at the first IDE.

[0112] Example 20. The non-transitory machine-readable medium of any of Examples 15-19, wherein the operations further comprise:

[0113] receiving, at the language server, a command from the second IDE via the LSP to run a first test from the first testing framework on the software code in the second IDE;

[0114] running, by the second IDE, a first test from the first test framework on the software code by communicating with the first test framework using the LSP;

[0115] receiving feedback from the first test framework via the LSP regarding running the first test on the software code by the second IDE;

[0116] Information regarding feedback of running the first test on the software code by the second IDE is reported to the second IDE via the LSP.

[0117] Figure 6 is a block diagram 600 illustrating a software architecture 602 that may be installed on any one or more of the devices described above. Figure 6is only a non-limiting example of a software architecture, and it should be understood that a variety of other architectures may be implemented to facilitate the functionality described herein. In various embodiments, the software architecture 602 is composed of, for example, Figure 7 602 is implemented by the hardware of the machine 700, which includes a processor 710, a memory 730, and an input / output (I / O) component 750. In this example architecture, the software architecture 602 can be conceptualized as a stack of layers, each of which can provide specific functionality. For example, the software architecture 602 includes layers such as an operating system 604, a library 606, a framework 608, and an application 610. According to some embodiments, in operation, the application 610 calls out an API call 612 through the software stack and receives a message 614 in response to the API call 612.

[0118] In various implementations, the operating system 604 manages hardware resources and provides public services. The operating system 604 includes, for example, a kernel 620, services 622, and drivers 624. According to some embodiments, the kernel 620 acts as an abstraction layer between the hardware and other software layers. For example, the kernel 620 provides memory management, processor management (e.g., scheduling), component management, networking and security settings, and other functions. Services 622 can provide other public services to other software layers. According to some embodiments, the driver 624 is responsible for controlling or interfacing with the underlying hardware. For example, the driver 624 may include a display driver, a camera driver, or Low energy driver, flash driver, serial communication driver (e.g., Universal Serial Bus (USB) driver), Wi-Fi driver, audio driver, power management driver, etc.

[0119] In some embodiments, library 606 provides a low-level common infrastructure used by application 610. Library 606 may include system library 630 (eg, C standard library), which may provide functions such as memory allocation functions, string manipulation functions, math functions, and the like. In addition, the library 606 may include an API library 632, such as a media library (e.g., a library that supports the presentation and manipulation of various media formats, such as Moving Picture Experts Group-4 (MPEG4), Advanced Video Codec (H.264 or AVC), Moving Picture Experts Group Layer-3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR) audio codec, Joint Photographic Experts Group (JPEG or JPG), or Portable Network Graphics (PNG)), a graphics library (e.g., an OpenGL framework for rendering in 2D and 3D in a graphics context on a display), a database library (e.g., SQLite that provides various relational database functions), a network library (e.g., WebKit that provides network browsing functions), etc. The library 606 may also include a variety of other libraries 634 to provide a variety of other APIs to the application 610.

[0120] According to some embodiments, the framework 608 provides a high-level common infrastructure that can be utilized by the applications 610. For example, the framework 608 provides various graphical user interface (GUI) functions, advanced resource management, advanced location services, etc. The framework 608 can provide various other APIs that can be utilized by the applications 610, some of which can be specific to a particular operating system 604 or platform.

[0121] In an example embodiment, applications 610 include a home application 650, a contacts application 652, a browser application 654, a book reader application 656, a location application 658, a media application 660, a messaging application 662, a game application 664, and various other applications, such as third-party applications 666. According to some embodiments, application 610 is a program that executes the functions defined in the program. Various programming languages, such as object-oriented programming languages ​​(e.g., Objective-C, Java, or C++) or procedural programming languages ​​(e.g., C or assembly language) can be used to create one or more applications 610 constructed in various ways. In a specific example, third-party applications 666 (e.g., provided by an entity other than the vendor of a particular platform using ANDROIDTM or IOS TM Software development kit (SDK) applications can be developed on platforms such as IOS TM ANDROID TM , Mobile software running on a mobile operating system of the mobile phone or another mobile operating system. In this example, third-party application 666 can call out API call 612 provided by operating system 604 to facilitate the functions described herein.

[0122] Figure 7 A diagram of a machine 700 in the form of a computer system according to an example embodiment is shown in which a set of instructions for causing the machine 700 to perform any one or more of the methodologies discussed herein may be executed. Specifically, Figure 7 A diagram of a machine 700 in the example form of a computer system is shown in which instructions 716 (e.g., software, programs, applications, applet, apps, or other executable code) may be executed to cause the machine 700 to perform any one or more of the methodologies discussed herein. For example, the instructions 716 may cause the machine 700 to perform Figure 5 Additionally or alternatively, instruction 716 may implement Figure 1-Figure 5Etc. Instructions 716 convert a general, unprogrammed machine 700 into a specific machine 700 that is programmed to perform the functions described and shown in the described manner. In alternative embodiments, the machine 700 operates as a standalone device, or can be coupled (e.g., networked) to other machines. In a networked deployment, the machine 700 can operate as a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment. The machine 700 may include, but is not limited to, a server computer, a client computer, a personal computer (PC), a tablet computer, a laptop computer, a netbook, a set-top box (STB), a personal digital assistant (PDA), an entertainment media system, a cellular phone, a smart phone, a mobile device, a wearable device (e.g., a smart watch), a smart home device (e.g., a smart appliance), other smart devices, web appliances, a network router, a network switch, a bridge, or any machine capable of sequentially or otherwise executing instructions 716, which specifies the actions to be taken by the machine 700. Further, while a single machine 700 is illustrated, the term "machine" shall also be taken to include a cluster of machines 700 that individually or jointly execute instructions 716 to perform any one or more of the methodologies discussed herein.

[0123] The machine 700 may include a processor 710, a memory 730, and I / O components 750, which may be configured to communicate with each other, such as via a bus 702. In an example embodiment, the processor 710 (e.g., a central processing unit (CPU), a reduced instruction set computing (RISC) processor, a complex instruction set computing (CISC) processor, a graphics processing unit (GPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a radio-frequency integrated circuit (RFIC), another processor, or any suitable combination thereof) may include, for example, a processor 712 and a processor 714 that may execute instructions 716. The term "processor" is intended to include multi-core processors, which may include two or more independent processors (sometimes referred to as "cores") that may execute instructions 716 simultaneously. Although Figure 7 Multiple processors 710 are shown, but the machine 700 may include a single processor 712 having a single core, a single processor 712 having multiple cores (e.g., a multi-core processor 712), multiple processors 712, 714 having single cores, multiple processors 712, 714 having multiple cores, or any combination thereof.

[0124] The memory 730 may include a main memory 732, a static memory 734, and a storage unit 736, each of which may be accessed by the processor 710, such as via the bus 702. The main memory 732, the static memory 734, and the storage unit 736 store instructions 716 that embody any one or more of the methods or functions described herein. During execution of the instructions 716 by the machine 700, the instructions 716 may also reside, in whole or in part, within the main memory 732, within the static memory 734, within the storage unit 736, within at least one of the processors 710 (e.g., within a cache memory of a processor), or any suitable combination thereof.

[0125] I / O components 750 may include a variety of components to receive input, provide output, generate output, send information, exchange information, capture measurements, etc. The specific I / O components 750 included in a particular machine will depend on the type of machine. For example, a portable machine such as a mobile phone will likely include a touch input device or other such input mechanism, while a headless server machine will likely not include such a touch input device. It should be understood that I / O components 750 may include components not included in the machine. Figure 7 . The I / O components 750 are grouped according to function only to simplify the following discussion, and the grouping is by no means limiting. In various example embodiments, the I / O components 750 may include an output component 752 and an input component 754. The output component 752 may include a visual component (e.g., a display such as a plasma display panel (PDP), a light-emitting diode (LED) display, a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)), an acoustic component (e.g., a speaker), a tactile component (e.g., a vibration motor, a resistance mechanism), other signal generators, etc. Input component 754 may include an alphanumeric input component (e.g., a keyboard, a touch screen configured to receive alphanumeric input, a photo-optical keyboard, or other alphanumeric input component), a point-based input component (e.g., a mouse, a touch pad, a trackball, a joystick, a motion sensor, or other pointing tool), a tactile input component (e.g., a physical button, a touch screen or other tactile input component that provides the location and / or force of touch or touch gestures), an audio input component (e.g., a microphone), etc.

[0126] In further example embodiments, the I / O component 750 may include a biometric component 756, a motion component 758, an environmental component 760, or a position component 762, as well as various other components. For example, the biometric component 756 may include a component for detecting expressions (e.g., hand expressions, facial expressions, voice expressions, body postures, or eye tracking), measuring biosignals (e.g., blood pressure, heart rate, body temperature, sweating, or brain waves), identifying people (e.g., voice recognition, retinal recognition, facial recognition, fingerprint recognition, or EEG-based recognition), etc. The motion component 758 may include an acceleration sensor component (e.g., an accelerometer), a gravity sensor component, a rotation sensor component (e.g., a gyroscope), etc. The environmental component 760 may include, for example, an illumination sensor component (e.g., a photometer), a temperature sensor component (e.g., one or more thermometers that detect ambient temperature), a humidity sensor component, a pressure sensor component (e.g., a barometer), a sound sensor component (e.g., one or more microphones that detect background noise), a proximity sensor component (e.g., an infrared sensor that detects nearby objects), a gas sensor (e.g., a gas detection sensor that detects concentrations of hazardous gases for safety or measures pollutants in the atmosphere), or other components that can provide indications, measurements, or signals corresponding to the surrounding physical environment. The positioning component 762 may include a position sensor component (e.g., a Global Positioning System (GPS) receiver component), an altitude sensor component (e.g., an altimeter or barometer that detects air pressure from which altitude can be derived), an orientation sensor component (e.g., a magnetometer), etc.

[0127] Communication can be achieved using a variety of technologies. I / O components 750 may include a communication component 764 that is operable to couple machine 700 to network 780 or device 770 via coupling 782 and coupling 772, respectively. For example, communication component 764 may include a network interface component or another suitable device that interfaces with network 780. In further examples, communication component 764 may include a wired communication component, a wireless communication component, a cellular communication component, a near field communication (NFC) component, Components (e.g. Low energy), Device 770 may be another machine or any of a variety of peripheral devices (eg, coupled via USB).

[0128] In addition, the communication component 764 can detect an identifier or include a component operable to detect an identifier. For example, the communication component 764 can include a radio-frequency identification (RFID) tag reader component, an NFC smart tag detection component, an optical reader component (e.g., an optical sensor that detects one-dimensional barcodes such as Universal Product Code (UPC) barcodes, multi-dimensional barcodes such as QR Codes, Aztec Codes, Data Matrix, Dataglyph, MaxiCode, PDF417, Ultra Code, UCC RSS-2D barcodes, and other optical codes), or an acoustic detection component (e.g., a microphone that recognizes tagged audio signals). In addition, various information can be derived via the communication component 764, such as location via Internet Protocol (IP) geolocation, location via Internet Protocol (IP), ... The location of signal triangulation, the location of an NFC beacon signal via detection that can indicate a specific location, etc.

[0129] Various memories (e.g., 730, 732, 734 and / or memory of processor(s) 710) and / or storage unit 736 may store one or more sets of instructions 716 and data structures (e.g., software) that embody or are utilized by any one or more of the methods or functions described herein. When executed by processor(s) 710, these instructions (e.g., instructions 716) cause various operations to implement the disclosed embodiments.

[0130] As used herein, the terms "machine storage medium", "device storage medium" and "computer storage medium" refer to the same thing and may be used interchangeably. These terms refer to a single or multiple storage devices and / or media (e.g., centralized or distributed databases, and / or associated caches and servers) that store executable instructions and / or data. Therefore, these terms should be considered to include, but are not limited to, solid-state memory and optical and magnetic media, including memory internal or external to the processor. Specific examples of machine storage media, computer storage media and / or device storage media include non-volatile memory, including, for example, semiconductor memory devices, such as erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), field-programmable gate array (FPGA), and flash memory devices; magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The terms "machine storage medium," "computer storage medium," and "device storage medium" expressly exclude carrier waves, modulated data signals, and other such media, at least some of which are covered by the term "signal media" discussed below.

[0131] In various example embodiments, one or more portions of network 780 may be an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local-area network (LAN), a wireless LAN (WLAN), a wide-area network (WAN), a wireless WAN (WWAN), a metropolitan-area network (MAN), the Internet, a portion of the Internet, a portion of a public switched telephone network (PSTN), a plain old telephone service (POTS) network, a cellular telephone network, a wireless network, For example, network 780 or a portion of network 780 may include a wireless or cellular network, and coupling 782 may be a Code Division Multiple Access (CDMA) connection, a Global System for Mobile communications (GSM) connection, or another type of cellular or wireless coupling. In this example, coupling 782 can implement any of a variety of types of data transmission technologies, such as single-carrier radio transmission technology (1xRTT), Evolution-Data Optimized (EVDO) technology, General Packet Radio Service (GPRS) technology, Enhanced Data Rates for GSM Evolution (EDGE) technology, Third Generation Partnership Project (3GPP) including 3G, Fourth Generation Wireless (4G) networks, Universal Mobile Telecommunications System (UMTS), High-Speed ​​Packet Access (HSPA), Worldwide Interoperability for Microwave Access (WiMAX), Long-Term Evolution (LTE) standards, other standards defined by various standards development organizations, other remote protocols, or other data transmission technologies.

[0132] Instructions 716 may be sent or received over network 780 using a transmission medium via a network interface device (e.g., a network interface component included in communication component 764) and utilizing any of a number of well-known transmission protocols (e.g., Hypertext Transfer Protocol [HTTP]). Similarly, instructions 716 may be sent or received using a transmission medium via a coupling 772 (e.g., a peer-to-peer coupling) to device 770. The terms "transmission medium" and "signal medium" refer to the same thing and may be used interchangeably in this disclosure. The terms "transmission medium" and "signal medium" should be understood to include any intangible medium capable of storing, encoding, or carrying instructions 716 for execution by machine 700, and include digital or analog communication signals or other intangible media to facilitate the communication of such software. Thus, the terms "transmission medium" and "signal medium" should be understood to include any form of modulated data signal, carrier wave, etc. The term "modulated data signal" refers to a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal.

[0133] The terms "machine-readable medium," "computer-readable medium," and "device-readable medium" refer to the same thing and may be used interchangeably in this disclosure. These terms are defined to include both machine storage media and transmission media. Thus, these terms include both storage devices / medium and carrier / modulated data signals.

Claims

1. A system comprising: at least one hardware processor; as well as A computer readable medium storing instructions, which, when executed by the at least one hardware processor, causes the at least one hardware processor to perform operations including: receiving, at a language server, a command from a first integrated development environment (IDE) via a language server protocol (LSP) to run a first test of a first testing framework on software code in the first IDE; running a first test of the first test framework by communicating with the first test framework using the LSP; receiving feedback from the first test framework via the LSP, the feedback comprising one or more results of executing the first test on the software code; as well as Information about the feedback is reported to the first IDE via the LSP.

2. The system according to claim 1, wherein: The command is a command for executing a code action of the language server.

3. The system according to claim 2, wherein: Reporting information about the feedback includes writing information representing the feedback as an annotation code into the software code.

4. The system according to claim 2, wherein: The code action is a custom code action that defines one or more custom parameters, and the one or more custom parameters are used to pass information representing feedback to the first IDE.

5. The system according to claim 4, wherein: Information in the one or more custom parameters is presented in a graphical user interface element at the first IDE.

6. The system according to claim 1, wherein: The operations also include: receiving a command from a second IDE to run a first test of a first testing framework on the software code in the second IDE, wherein the command is received at the language server via the LSP; Running a first test of a first test framework on the software code by a second IDE, wherein the second IDE communicates with the first test framework using the LSP; receiving feedback from the first test framework via the LSP regarding running the first test on the software code by the second IDE; and Information about feedback from running the first test on the software code by the second IDE is reported, wherein the information is reported to the second IDE via the LSP.

7. The system according to claim 1, wherein: The command includes a request to run the first test in debug mode, and wherein running the first test of the first test framework by communicating with the first test framework using the LSP includes attaching a debugger to the first test using a debug adapter protocol (DAP).

8. A method comprising: receiving, at a language server, a command from a first integrated development environment (IDE) via a language server protocol (LSP) to run a first test of a first testing framework on software code in the first IDE; running a first test of the first test framework by communicating with the first test framework using the LSP; receiving feedback from the first test framework via the LSP, the feedback comprising one or more results of executing the first test on the software code; as well as Information about the feedback is reported to the first IDE via the LSP.

9. The method according to claim 8, wherein: The command is a command for executing a code action of the language server.

10. The method according to claim 9, wherein: Reporting information about the feedback includes writing information representing the feedback as an annotation code into the software code.

11. The method according to claim 9, wherein: The code action is a custom code action that defines one or more custom parameters, and the one or more custom parameters are used to pass information representing feedback to the first IDE.

12. The method according to claim 11, wherein: Information in the one or more custom parameters is presented in a graphical user interface element at the first IDE.

13. The method according to claim 8, further comprising: receiving a command from a second IDE to run a first test of a first testing framework on the software code in the second IDE, wherein the command is received at the language server via the LSP; Running a first test of a first test framework on the software code by a second IDE, wherein the second IDE communicates with the first test framework using the LSP; receiving feedback from the first test framework via the LSP regarding running the first test on the software code by the second IDE; and Information about feedback from running the first test on the software code by the second IDE is reported, wherein the information is reported to the second IDE via the LSP.

14. The method according to claim 8, wherein: The command includes a request to run the first test in debug mode, and wherein running the first test of the first test framework by communicating with the first test framework using the LSP includes attaching a debugger to the first test using a debug adapter protocol (DAP).

15. A non-transitory machine-readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising: receiving a command from a second IDE to run a first test of a first test framework on the software code in the second IDE, wherein: The command is received at the language server via the LSP; Running a first test of a first test framework on the software code by a second IDE, wherein the second IDE communicates with the first test framework using the LSP; receiving feedback from the first test framework via the LSP regarding running the first test on the software code by the second IDE; and Information about feedback from running the first test on the software code by the second IDE is reported, wherein the information is reported to the second IDE via the LSP.

16. The non-transitory machine-readable medium of claim 15, wherein: The command is a command for executing a code action of the language server.

17. The non-transitory machine-readable medium of claim 16, wherein: Reporting information about the feedback includes writing information representing the feedback as an annotation code into the software code.

18. The non-transitory machine-readable medium of claim 16, wherein: The code action is a custom code action that defines one or more custom parameters, and the one or more custom parameters are used to pass information representing feedback to the first IDE.

19. The non-transitory machine-readable medium of claim 18, wherein: Information in the one or more custom parameters is presented in a graphical user interface element at the first IDE.

20. The non-transitory machine-readable medium of claim 15, wherein: The operations also include: receiving a command from a second IDE to run a first test of a first testing framework on the software code in the second IDE, wherein the command is received at the language server via the LSP; Running a first test of a first test framework on the software code by a second IDE, wherein the second IDE communicates with the first test framework using the LSP; receiving feedback from the first test framework via the LSP regarding running the first test on the software code by the second IDE; and Information about feedback from running the first test on the software code by the second IDE is reported, wherein the information is reported to the second IDE via the LSP.