Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instruction to run with newman added #50

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Getting Started with Contributing

The first thing you need to do is find an issue to work on. Go to Issues and find a suitable issue which you think you can handle and are willing to work on. Make sure you ask the maintainers to have the issue assigned to you before you start working on it.
soham4abc marked this conversation as resolved.
Show resolved Hide resolved


**Step 1:** Fork the repository

**Step 2:** Clone the forked repository to your local machine with `git clone <repository link>`
soham4abc marked this conversation as resolved.
Show resolved Hide resolved

**Step 3:** Add a remote (upstream) to your fork using:
```
git remote add upstream https://github.com/postmanlabs/newman-dashboard.git
```

**Step 4:** Synchronize your fork with upstream using the following commands:

```

$ git checkout develop

$ git fetch upstream

$ git merge upstream/develop

$ git push origin develop

```

**Step 5:** Make a branch with a suitable name relevant to the issue you are working on using `git branch <branch>`

**Step 6:** Switch your working branch from master to the newly created branch with `git checkout <branch>`

**Step 7:** Work on the changes. You can keep track of your branch and staging area using `git status`

**Step 8:** Make sure you run the `black` autolinter before you add your changes to the staging area. `black` can be installed on your local system using `pip install black`, and can be run with `black .` on all the files in your current working directory.

**Step 9:** Add all of the changes you made to the staging area before you commit with `git add .`

**Step 10:** Commit your changes with a meaningful commit message using `git commit -m "commit message"`

**Step 11:** Finally push your changes to your forked repository using `git push origin <branch>`




## Usage

This package is both a reporter and a standalone package. The standalone package takes care of launching the dashboard, while the reporter connects to the newman run.
soham4abc marked this conversation as resolved.
Show resolved Hide resolved

A. For installation:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's divide the setup into multiple parts: reporter, frontend and dashboard.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to add information about installing node modules, etc.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we need to just provide me the details and sub-parts I need to create

```
npm pack reporter
soham4abc marked this conversation as resolved.
Show resolved Hide resolved
```

```
npm i -g newman-reporter-dashboard-0.0.1.tgz
```

B. Launch the dashboard on `localhost:5001`
soham4abc marked this conversation as resolved.
Show resolved Hide resolved

```
newman-dashboard
soham4abc marked this conversation as resolved.
Show resolved Hide resolved
```

You can also choose to daemonize the dashboard using the `--daemonize` flag.

The dashboard frontend would now be visible on `http://localhost:5001/`

C. Connect a newman run to the dashboard

```
newman run collection.json -r dashboard
```
This will connect the run to the dashboard and you would be able to view its status on the frontend.

D. Run file with Newman

```
cd /path/to/newman
npm link
npm link newman-reporter-dashboard
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm no expert on npm link but I think some modifications are required here.

Give a sec to review this please @coditva .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. The npm link needs to be executed in the newman-dashboard/reporter directory.


newman run -r dashboard collection.json
soham4abc marked this conversation as resolved.
Show resolved Hide resolved
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to add a section on running and writing tests

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please provide me what needs to be written here

## Making your first Pull Request

Once you have finished working on an issue and have pushed the changes to your forked repository, it is time to make your first pull request. Go to your forked repository on GitHub and it should show you an option to `Compare & pull request`. Click the `Compare & pull request` button and it will directly initiate a Pull Request for you, follow the Pull Request template and fill out the necessary information. Once that is done, click the `Create Pull Request` button.
soham4abc marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ Newman Dashboard aims to provide a real-time WebUI dashboard which can let you c

This project was built during [Google Summer of Code 2021](https://summerofcode.withgoogle.com/projects/#5547391014404096) ☀️ with [Postman](https://github.com/postmanlabs) 🚀


## [Usage and contribution details (click here)](CONTRIBUTING.md)



## Environment setup

A. Install all dependencies
Expand Down