0.0.0-aj-beta.12 • Published 8 months ago

@abstraktor/actorjs v0.0.0-aj-beta.12

Weekly downloads
-
License
SEE LICENSE IN Li...
Repository
gitlab
Last release
8 months ago

ActorJs

ActorJs is a tool for end-to-end testing that you run in a browser.

Trigger, mock, and intercept anything.

ActorJs simulates all processes and services surrounding a System Under Test, allowing you to isolate a System Under Test in a very efficient way, no matter how many surrounding systems or protocols the System Under Test needs to use. You create Actors (very small simulators) that use stacks for communication.

Prerequisites

Nodejs 20.x.x or later Git 2.26.0 or later

Install ActorJs

npm install @abstraktor/actorjs

Update ActorJs

npm update

Build ActorJs Server

aj release

If you make changes to files, but ActorJs has not been started, or if you pull updates from your local repos, you must build the server again using aj release. Otherwise, just use aj to start ActorJs.

Linux & Mac: To use the command aj, an alias is needed for the actorjs.sh file in the installation folder. During installation, aliases are added to .bashrc (Linux and Mac) and .zshrc (Mac). If you use another shell, you have to add the alias yourself. The first time you install ActorJs, you need to restart the terminal or source the file containing the alias, for instance:

source ~/.bashrc

Start ActorJs Client

Open a browser with the url http://localhost:9005

Beta Testers

We are looking for beta testers! To apply, send an e-mail to: betatester@actorjs.com

Documentation

Youtube

Further reading in the ActorJs tool

The ActorJs documentation can be found in the tool. To access it, click the following links when the tool is running.

Example code

HTTP - server

*run() {
  this.httpConnection.send(new HttpMsgGetRequest(this.requistUri));
    
  const response = this.httpConnection.receive();
  VERIFY_VALUE(HttpApi.StatusCode.OK, response.statusCode, ' HTTP response line status code:');
  VERIFY_CONTENT_OPTIONAL('content-name', response.getHeaderNumber(HttpApi.Header.CONTENT_LENGTH), response.getBody());
}

Websocket - client

*run() {
  this.httpConnection.send(new HttpGetUpgradeRequest(this.requistUri, this.wsProtocol));
 
  const response = this.httpConnection.receive();
  this.websocketConnection = this.switchProtocol('websocket', this.httpConnection);
    
  this.websocketConnection.send(new WebsocketStackApi.TextFrame(this.wsText, this.wsMask));
    
  this.websocketConnection.send(new WebsocketStackApi.CloseFrame());
}

Puppeteer - client

*run() {
  const page = this.puppeteerConnection.page;
  yield page.click('.w-button');
}

Socket - server

*run() {
  this.socketConnection.accept();
  const request = this.socketConnection.receiveLine();
  VERIFY_VALUE('Hello World!', request)
}
@babel/plugin-transform-runtime@babel/preset-react@babel/preset-env@babel/runtime@codemirror/autocomplete@codemirror/commands@codemirror/lang-css@codemirror/lang-html@codemirror/lang-javascript@codemirror/lang-json@codemirror/lang-markdown@codemirror/language@codemirror/search@codemirror/state@codemirror/view@uiw/codemirror-theme-vscodebufferutilchrome-remote-interfacecli-colord3getoshpack.jsjquerymime-typesos-namepuppeteerreactreact-domremarkablesimple-gitsudo-jssudo-promptws@abstraktor/z-build-project@abstraktor/z-build-require@abstraktor/z-abs-corelayer-cs@abstraktor/z-abs-funclayer-engine-cs@abstraktor/z-abs-corelayer-server@abstraktor/z-abs-funclayer-database-server@abstraktor/z-abs-funclayer-actor-server@abstraktor/z-abs-funclayer-stack-server@abstraktor/z-abs-funclayer-engine-server@abstraktor/z-abs-complayer-codeeditor-server@abstraktor/z-abs-complayer-documentation-server@abstraktor/z-abs-complayer-markup-server@abstraktor/z-database-status@abstraktor/z-abs-3pplayer-d3-client@abstraktor/z-abs-3pplayer-jquery-client@abstraktor/z-abs-3pplayer-nodejs-client@abstraktor/z-abs-3pplayer-react-client@abstraktor/z-abs-3pplayer-reactdom-client@abstraktor/z-abs-corelayer-client@abstraktor/z-abs-complayer-bootstrap-client@abstraktor/z-abs-complayer-codeeditor-client@abstraktor/z-abs-complayer-codemirror-client@abstraktor/z-abs-complayer-documentation-client@abstraktor/z-abs-complayer-markup-client@abstraktor/z-abs-complayer-modaldialog-client@abstraktor/z-abs-complayer-router-client@abstraktor/z-abs-complayer-tree-client@abstraktor/z-abs-complayer-toolversions-client@abstraktor/z-abs-complayer-visualizationinner-client@abstraktor/z-abs-complayer-visualizationlog-client@abstraktor/z-abs-complayer-visualizationsequencediagram-client@abstraktor/z-plugin-protocol-client-actorjs-cs@abstraktor/z-plugin-protocol-server-actorjs-cs@abstraktor/z-plugin-service-versioning-app-fs@abstraktor/z-plugin-service-user-fs@abstraktor/actorjs-content-global@abstraktor/actorjs-data-global@abstraktor/actorjs-documentation-bin@abstraktor/actorjs-documentation-text@abstraktor/actorjs-app
0.0.0-aj-beta.12

8 months ago

0.0.0-aj-beta.11

9 months ago

0.0.0-aj-beta.9

9 months ago

0.0.0-aj-beta.10

9 months ago

0.0.0-aj-beta.8

3 years ago

0.0.0-aj-beta.7

3 years ago

0.0.0-aj-beta.6

3 years ago

0.0.0-aj-beta.5

3 years ago

0.0.0-aj-beta.4

3 years ago

0.0.0-aj-beta.3

3 years ago

0.0.0-aj-beta.2

3 years ago

0.0.0-aj-beta.1

3 years ago

0.0.0-aj-alpha.9

3 years ago

0.0.0-aj-alpha.8

3 years ago

0.0.2

4 years ago

0.0.1

4 years ago