Performance Testing with WunderQL
WunderQL.com
Table of Contents
WunderQL is a cross-platform desktop application used for testing a GraphQL server's performance. Developed under tech accelerator OSLabs, WunderQL was created with the developer in mind.
We wanted a simple, no fuss developer tool that allows the user to measure the performance of their GraphQL server throughout the development life cycle. You can measure the response time of your GraphQL queries, simulate a production environment with load testing, and search your past queries to see if there was any degradation in performance over time.
-
To measure the response time of your GraphQL server, please select the 'Test Query' option from the nav bar. You can enter in a new query or select a previous query you ran on the top right hand drop down. This will auto fill the query select form. Clicking the Send Query button will get you the response and the average response time of your query.
-
To perform a load test, select Load Test in the nav bar. Enter in your GraphQL Query, nickname for your query (to be saved for future reference) and then the number of requests per second. Click on the 'Send Query' button to get your results!
To get a local copy up and running, follow these steps:
- Clone the repo.
- Run
npm install
. - Run
npm run prod
to start the application. - Create or login to your ElephantSQL account.
- Run the following script to create your local database:
CREATE TABLE public.users (
"_id" serial PRIMARY KEY,
"name" varchar NOT NULL,
"email" varchar UNIQUE NOT NULL,
"username" varchar UNIQUE NOT NULL,
"password" varchar NOT NULL
) WITH (
OIDS=FALSE
);
CREATE TABLE public.graphqlurls (
"_id" serial PRIMARY KEY,
"nickname" varchar NOT NULL,
"url" varchar NOT NULL,
"user_id" bigint NOT NULL,
UNIQUE (url, user_id),
FOREIGN KEY (user_id) REFERENCES users (_id)
) WITH (
OIDS=FALSE
);
CREATE TABLE public.queries (
"_id" serial PRIMARY KEY,
"query_name" varchar NOT NULL,
"query_string" varchar NOT NULL,
"url_id" bigint NOT NULL,
UNIQUE (query_string, url_id),
FOREIGN KEY (url_id) REFERENCES graphqlurls (_id)
) WITH (
OIDS=FALSE
);
CREATE TABLE public.response_times (
"_id" serial PRIMARY KEY,
"date" varchar NOT NULL,
"response_time" float NOT NULL,
"query_id" bigint NOT NULL,
FOREIGN KEY (query_id) REFERENCES queries (_id)
) WITH (
OIDS=FALSE
);
CREATE TABLE public.load_test_response_times (
"_id" serial PRIMARY KEY,
"date" varchar NOT NULL,
"number_of_child_processes" bigint NOT NULL,
"average_response_time" float NOT NULL,
"result" varchar NOT NULL,
"query_id" bigint NOT NULL,
FOREIGN KEY (query_id) REFERENCES queries (_id)
) WITH (
OIDS=FALSE
);
- A ElephantSQL account to host your local database
Raubern Totanes - GitHub - LinkedIn