<commit_before># Testing Implementation

We run mainly two types of tests

-   Unit tests
-   Integration test

# How to run

Before running either unit tests or integration test, Go to the application root directory where `package.json` file is located (i:e `<carbon-apimgt-root>/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher-new/`) and run `npm install` command to download all the dependencies.

## Unit tests

To run the unit tests, simply execute the `npm test` command in the application root directory (where the package.json file located). `npm test` is an alias to `jest` command defined in `package.json`.

## Integration tests

Before running the integration tests, Make sure you have started relevent WSO2 API-Manager server in it's default ports(managment port`9443`) locally.Then, to run integration tests, Execute the command `npm run test:integration` in the application root directory.<commit_msg>Update readme with pre-req<commit_after># Testing Implementation

We run mainly two types of tests

-   Unit tests
-   Integration test

# Prerequisites

Require NodeJs 8.0 or higher, and npm 5.0 or higher.You may use [`nvm`](https://github.com/nvm-sh/nvm) for installing/managing Node and NPM tools.

# How to run

Before running either unit tests or integration test, Go to the application root directory where `package.json` file is located (i:e `<carbon-apimgt-root>/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher-new/`) and run `npm install` command to download all the dependencies.

## Unit tests

To run the unit tests, simply execute the `npm test` command in the application root directory (where the package.json file located). `npm test` is an alias to `jest` command defined in `package.json`.

## Integration tests

Before running the integration tests, Make sure you have started relevent WSO2 API-Manager server in it's default ports(managment port`9443`) locally.Then, to run integration tests, Execute the command `npm run test:integration` in the application root directory.
{'fraction_non_alphanumeric': 0.07718120805369127, 'fraction_numerical': 0.007670182166826462, 'mean_word_length': 4.74931129476584, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2022060', 'n_tokens_mistral': 589, 'n_tokens_neox': 555, 'n_words': 260}