Skip to content

Commit ee038b4

Browse files
committed
Merge branch 'developer'
2 parents 0229560 + 22319b2 commit ee038b4

File tree

800 files changed

+29098
-10823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

800 files changed

+29098
-10823
lines changed

.gitignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ main/logs
77
target
88
*.class
99
hs_err_pid*
10+
backend/logs
1011

1112
# JavaScript
12-
main/src/main/webapp/node_modules
13-
main/src/main/webapp/dist
14-
main/src/main/webapp/tests/coverage
15-
main/src/main/webapp/assets/fonts
16-
main/src/main/webapp/assets/swagger-ui
13+
cli/src/main/javascript/node_modules
14+
frontend/src/main/javascript/node_modules
15+
frontend/src/main/javascript/dist
16+
frontend/src/main/javascript/tests/coverage
17+
frontend/src/main/javascript/assets/fonts
1718

1819
# Auto Generated Swagger Doc
1920
main/src/main/webapp/restdocs
2021

2122
main/uploads
23+
24+
frontend/src/main/javascript/npm-debug\.log

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
# ALEX 1.4.0
2+
3+
## Breaking Changes
4+
5+
* Symbol abbreviations have been removed. To use old exported symbol sets, remove the *abbreviation* property manually
6+
from the JSON file.
7+
8+
* The HTML Element Picker does not work as before. In order to use it properly, make sure you start your browser with
9+
disabled CORS rules or use a plugin. See the [user documentation](http://learnlib.github.io/alex/book/1.4.0/) for
10+
detailed instructions.
11+
12+
## Features
13+
14+
* Define a default web driver to execute tests in
15+
* Immediately stop learning instead of waiting for the current iteration to finish
16+
* Support for native headless web driver support for Chrome and Firefox
17+
* Action recorder - Record a sequence of actions for a symbol in the Element Picker
18+
* Extended testing capability - Save and execute test cases without starting a learning process
19+
* Calculate the difference between two models
20+
* Added Safari driver
21+
* New actions:
22+
* Wait for a text to appear
23+
* Wait for the value of an elements attribute
24+
* Interact with alert, prompt and confirm dialogs
25+
* Validate JSON against a JSON schema
26+
27+
See the [user documentation](http://learnlib.github.io/alex/book/1.4.0/) for more details.
28+
129
# ALEX 1.3.0
230

331
## Breaking Changes

README.md

Lines changed: 30 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,23 @@
11
<p align="center">
2-
<img src="assets/images/logo.png" style="max-width:100%;">
2+
<img src="src/main/resources/images/logo.png" style="max-width:100%;">
33
</p>
44

55
# ALEX
66

7-
Automata Learning Experience (ALEX) is a web application that allows you run automated tests on web applications and JSON-based REST services using Active Automata Learning.
7+
Automata Learning Experience (ALEX) is an extension of the [LearnLib](https://github.com/LearnLib/learnlib) that allows
8+
you run automated tests on web applications and JSON-based REST APIs using active automata learning.
89

9-
## How it works
10+
Users model basic test inputs for their target application which are used by ALEX to automatically infer an automaton
11+
model, or to be more precise, a [Mealy machine](https://en.wikipedia.org/wiki/Mealy_machine) that represents the
12+
behavior of the web application.
1013

11-
Let us take a look at the example of an authentication system.
12-
For an integration test you would probably write tests using Selenium or something else that check the following behavior:
13-
14-
* register > login > logout _should work_
15-
* logout _should not work_
16-
* register > logout _should not work_
17-
* ...
18-
19-
With increasing complexity and feature set of an application, integration tests might be hard to maintain if all possible and impossible combinations of features should be tested.
20-
With ALEX, we follow a different, more automated approach that
21-
22-
1. does not require any knowledge about the implementation of an application,
23-
2. does not require any experience in programming and
24-
3. separates the language specific tests from the application to test.
25-
26-
Assume the authentication system mentioned above has the following features: _register_, _login_ and _logout_.
27-
Then, we model each feature independent of each other using e.g. [Selenium](http://www.seleniumhq.org/).
28-
In Active Automata Learning, this set of testable features is called **alphabet** where the elements of the alphabet are called **symbols**.
29-
A sequence of symbols is called a **word**.
30-
31-
We then pass the learning alphabet to a **learner** that uses specific algorithms to create a model of the underlying application and how it behaves based on the given symbols.
32-
Therefore, words are executed on the real system under learning and its reactions are observed.
33-
Finally, the learner creates a **hypothesis** as an output that is modeled as a [Mealy machine](https://en.wikipedia.org/wiki/Mealy_machine).
34-
In this example, it would hopefully look like this:
35-
36-
![Hypothesis](assets/images/hypothesis.jpg)
37-
38-
As it can be seen, the learner has learned the application and all features work as intended.
39-
From here on, more symbols can be added and learned.
40-
41-
It can be that the learner has not learned the application correctly, i.e. there is a word in the model that has a different output than the actual application.
42-
In fact, one can never be a 100% sure if the model actually represents the system under learning.
43-
How to check for and handle these mistakes is described in the [user manual](http://learnlib.github.io/alex/book/1.2.1/contents/user-manual/index.html).
44-
45-
If you want to know more about Active Automata Learning, you can find some resources at [Google Scholar](https://scholar.google.de/scholar?hl=de&q=active+automata+learning) or the homepage of the [LearnLib](http://learnlib.de/).
46-
47-
## Installation and first login
14+
## Installation and login
4815

4916
We developed and tested ALEX using either Windows 8.1 and higher and Linux Ubuntu 14.10 and higher.
5017
As the application runs on JAVA, any other system with an installed JVM should do fine.
51-
We also advise to use a modern web browser like Google Chrome >= v46, Mozilla Firefox >= v42 or Microsoft Edge with JavaScript enabled in order to run the front-end properly.
18+
We also advise to use a modern web browser like Google Chrome, Mozilla Firefox or Microsoft Edge with JavaScript enabled.
5219

53-
After the first start, you can login as admin backend using the account below.
20+
After the first start, you can login as an admin using the account below.
5421

5522
Email: *admin@alex.example* <br>
5623
Password: *admin*
@@ -60,57 +27,39 @@ Password: *admin*
6027
Make sure you have Java 8 installed on your system.
6128

6229
1. Download the latest version. [Download](https://github.com/LearnLib/alex/releases/latest)
63-
2. Open a terminal and start the war archive using `java -jar ALEX.war [--port=XXXX]`
30+
2. Open a terminal and start the *war* archive using `java -jar ALEX.war [--port=XXXX]`
6431
3. Open *http://localhost:8000* in a web browser
6532

6633
#### From source
6734

68-
For the Installation from the source files make sure your system matches the following system requirements:
35+
For the installation from the source files make sure your system matches the following requirements:
6936

7037
* Java JDK 8
7138
* Maven 3
7239
* Node.js v7.9.* and the NPM
7340

74-
To install and run ALEX, execute the following commands in a directory of your choice:
41+
To obtain ALEX execute the following commands in a directory of your choice:
7542

7643
1. `git clone https://github.com/LearnLib/alex.git`
7744
2. `cd alex`
78-
3. `mvn install [-DskipTests]`
79-
4. `cd main`
80-
5. `mvn spring-boot:run [-Dport=XXXX]`
81-
6. open *http://localhost:8000* in a web browser
45+
46+
Afterwards you can build and run ALEX by running following commands:
47+
48+
1. `mvn clean package [-DskipTests]`
49+
2. `java -jar build/target/ALEX/*war [--alex.port=XXXX]`
50+
3. open *http://localhost:8000* in a web browser
51+
52+
Or, if you just want to start the backend, you can use:
53+
54+
1. `cd main`
55+
2. `mvn spring-boot:run [-Dalex.port=XXXX]`
56+
3. open *http://localhost:8000* in a web browser
57+
8258

8359
## Further reading
8460

85-
* [User manual](http://learnlib.github.io/alex/book/1.2.1/contents/user-manual/index.html)
86-
* [Examples to get started](http://learnlib.github.io/alex/book/1.2.1/contents/examples/index.html)
87-
* [Developer docs](http://learnlib.github.io/alex/book/1.2.1/contents/developer-documents/index.html)
88-
89-
## FAQs
90-
91-
**Is ALEX ready for production use?** <br>
92-
ALEX has already been used by a class at the TU Dortmund University as a tool to test a student project for the last two years.
93-
As far as we are concerned, we used the application to learn applications like [Bugzilla](https://www.bugzilla.org/),
94-
parts of the famous [Wordpress](https://wordpress.org/) and the majority of the [TodoMVC](http://todomvc.com/) project.
95-
96-
**Could I potentially learn any available application that is accessible over the internet?** <br>
97-
Yes, you could, but really should not do that, since testing usually takes a lot of traffic, and your test targets may not like it.
98-
But we do not programmatically prohibit it either.
99-
The primary use case is to use ALEX for testing applications that are installed locally or in the same network.
100-
101-
**Do I really not have to have any programming experience?** <br>
102-
Yes and no, it depends on how you define programming experience.
103-
We made the best efforts to abstract all necessary steps to test a web application with ease.
104-
While modeling Selenium tests, it may eventually be helpful to have basic understanding of HTML and CSS.
105-
The same goes for modeling REST tests where it is needed that you can write JSON documents.
106-
But to our understanding neither JSON, HTML nor CSS are programming languages.
107-
108-
**How potent does my system have to be to run tests?** <br>
109-
Learning is a CPU and memory intense process, but we cannot really tell you an lower bound for your system specs.
110-
From our own observations, it is advised to have at least 2Gb of RAM and a relatively modern Dual Core CPU to run tests at a satisfiable performance.
111-
The more power your system has, the faster your tests should execute.
112-
But feel free to test it on your Raspberry PI.
113-
114-
**I want to learn a specific feature of my application but ALEX does not provide a way to model it. What can I do?** <br>
115-
Initially, we did not develop ALEX as a solution to all situations that may occur in a web application, but to the most common ones.
116-
If you think a key feature is missing, feel free to submit an issue and we will see what we can do.
61+
* [User manual](http://learnlib.github.io/alex/book/1.4.0/contents/user-manual/index.html)
62+
* [Examples](http://learnlib.github.io/alex/book/1.4.0/contents/examples/index.html)
63+
* [Developer docs](http://learnlib.github.io/alex/book/1.4.0/contents/developer-documents/index.html)
64+
* [Active automata learning](https://scholar.google.de/scholar?hl=de&q=active+automata+learning)
65+
* [LearnLib](http://learnlib.de/)

api/src/main/java/de/learnlib/alex/algorithms/LearnAlgorithmFactory.java

Lines changed: 0 additions & 56 deletions
This file was deleted.

assets/images/hypothesis.jpg

-11.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)