Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
anna-api-test-framework
Advanced tools
Framework for rapid development of API tests and report generation
Framework for rapid development of API tests and report generation
Install my-project with pip:
pip install anna-api-test-framework
from anna import Action, Report, Assert
@Report.epic('Simple tests')
@Report.story('Tests google')
@Report.testcase('https://www.google.com', 'Google')
@Report.link('https://www.google.com', 'Jast another link')
class TestExample:
@Report.title('Simple test google')
@Report.severity('CRITICAL')
def test_simple_request(self):
url = 'https://google.com'
method = 'GET'
want = 200
# insert discription of the test
Report.description(url=url, method=method, other='other information')
# doing request and geting response
action = Action()
response = action.request(method=method, url=url)
got = response.status_code
# checking response
with Report.step('Checking response'):
Assert.compare(
variable_first=want,
comparison_sign='==',
variable_second=got,
text_error='Response status code is not equal to expected'
)
For run test and generat a report use following commands:
pytest alluredir="./results"
For generat and open a report you need to install Allure and use the following commands:
allure generate "./results" -c -o "./report"
allure open "./report"
After that, the generated report will automatically open in your browser
The report contains all the information you need
FAQs
Framework for rapid development of API tests and report generation
We found that anna-api-test-framework demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.