-
Notifications
You must be signed in to change notification settings - Fork 420
Programming jSQL
Note
jSQL is opened to programmers, contact me directly or open a PR on GitHub.
Review a list of features to implement on Projects page and on Roadmap.
💉jSQL
runs on 28k lines of code that can break anytime when code is added therefore it requires tests to prevent regressions.
- Unit tests run and process stops if any failure is detected
- Then integration tests run, and process also stops if any test fails
- Finally a new version is released if all tests pass
Unit testing ensures that lines of code produce the expected result, it warns you when you break something while adding new code.
You run unit tests without any external resource, no database, no API, and you can inspect the lines of code that have been triggered during the tests by using the code coverage reports.
Untriggered code means either it's useless or it does not run as expected.
Integration testing checks that the components interact properly and validate that they access the expected external resources.
The following components must properly communicate during the integration tests on GitHub Actions
:
- the
View
displays the GUI, interacts withModel
and runs onVNC
screen - the injection
Model
runs withJUnit
testing framework and callsSpring
APIs - the
Spring
Web server and vulnerable APIs and pages are connected to the databases - the databases are
in-memory
and on🐳Docker
, all available for injection
New releases are automatically uploaded to GitHub when all tests pass and when an administrator approves the release.
The new version is then available to download, also 3rd party platforms like Kali Linux and Packetstorm are pulling the release to share the info on their site.
Generated documentation — Maven site
Every time the code changes and the tests run fine then the Maven docs and metrics are auto-generated and published on GitHub:
- Javadoc describing classes and methods
- Surefire and Failsafe reports to review unit tests and integration tests with execution time
- dependency report listing available version updates, and much more
Note
Open Maven site for detailed metrics describing the internal modules Model
and View
.
External platforms are also triggered on commit and produce additional reports:
- Sonar report measures code complexity, duplication and code smell
- Codecov report displays code coverage graphically
- Codacy report processes additional quality rules
The following diagram shows the global 💉jSQL
architecture, it describes the components that run on GitHub Actions
during the CI/CD process:
graph
junit(JUnit Tests)
subgraph "jSQL Injection"
gui(GUI)
model("💉Model")
end
subgraph Spring
apis([/api])
admin([/admin-page])
end
subgraph Memory
memory-other[("
Derby Mckoi
SQLite H2
HSQLDB
")]
end
subgraph Docker
subgraph Apache + PHP
direction LR
mysql[(MySQL)]
shell(["/shell.php"])
passwd(["/etc/passwd"])
end
end
subgraph Docker2 [Docker]
docker-other[("
Cubrid
Vertica
Informix Sybase
SqlServer Db2
Postgres Mimer
Firebird Neo4j
")]
end
gui -. "call" .-> shell
mysql -. create .-> shell
mysql -. read .-> passwd
junit -.-> gui
junit --> model
model & gui -.-> admin
model --> apis
apis --> Docker & Docker2 & Memory