Socket
Socket
Sign inDemoInstall

@abstraktor-shadow/actorjs

Package Overview
Dependencies
820
Maintainers
2
Versions
239
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @abstraktor-shadow/actorjs

Trigger, mock, and intercept anything - ActorJs is a tool for end-to-end testing that you run in a browser.


Version published
Maintainers
2
Created

Readme

Source

This is an Alpha and will be unpublished A Beta is comming soon!

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.

Install ActorJs

npm install @abstraktor/actorjs

Update ActorJs

npm update

Build ActorJs Server

aj debug

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

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)
}

Keywords

FAQs

Last updated on 27 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc