Skip to content

Commit

Permalink
Fix default selenium driver, onlyValidate & documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
simone36050 committed Dec 5, 2024
1 parent db366b1 commit 86bb76a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ Documentation about MIG-T and the language can be found in this repo's [wiki](ht

# MIG-T API Documentation

Explore the API endpoints and documentation here: <https://app.swaggerhub.com/apis-docs/PGSENO02/MIG-TAPIs/1.0.0#/>

### API Endpoints

MIG-T supports both GUI and API interaction. Two endpoints are available for API interaction:
Expand All @@ -98,7 +96,7 @@ MIG-T supports both GUI and API interaction. Two endpoints are available for API

#### /execute [POST]

Check the validity of the test and run the test.
Check the validity of the test and run the test. The *onlyValidate* parameter is available, if enabled the test will only be validated but not executed (e.g., `/execute?onlyValidate=true`)

Input:
```json
Expand All @@ -114,6 +112,14 @@ Input:
Output:
- HTTP status code 200 (ok)

If the validation of the test fails, the output is:
```json
{
"success": false,
"error": "the error"
}
```

#### /result [GET]

Checks whether the test is finished and returns the result.
Expand Down
5 changes: 3 additions & 2 deletions tool/src/main/java/migt/ExecuteWebServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletRequest;
import javax.swing.table.DefaultTableModel;
import java.awt.*;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -111,8 +112,8 @@ public void handle(String target, org.eclipse.jetty.server.Request baseRequest,

// verify errors
JsonObject result = new JsonObject();
String error = mainPane.lblOutput.getText();
if (false) {
if (mainPane.bot_tabbed.getBackgroundAt(mainPane.bot_tabs_index.get("Input JSON")) == Color.RED) {
String error = mainPane.txt_err_debug_tab.getText();
result.addProperty("success", false);
result.addProperty("error", error);
} else {
Expand Down
1 change: 1 addition & 0 deletions tool/src/main/java/migt/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public Main() {
//--------------------------------------
//DRIVER_PATH = Main.class.getClassLoader().getResource("driver/geckodriver").getPath();
//DRIVER_PATH = JOptionPane.showInputDialog(null, "enter the driver path:");
DRIVER_PATH = "";
//--------------------------------------

if (!DRIVER_PATH.equals("")) {
Expand Down

0 comments on commit 86bb76a

Please sign in to comment.