Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Often open source Test Automation projects lack a good reporting solution, pyhtmlreport solves that by creating HTML reports and represents the output as steps with screenshots.
pip install pyhtmlreport
Once you have installed pyhtmlreport - how do you get started?
from pyhtmlreport import Report
from selenium.webdriver import Chrome
from selenium.webdriver.common.keys import Keys
report = Report()
driver = Chrome()
report.setup(
report_folder=r'D:\Automation\Reports',
module_name='Google',
release_name='Release 1',
selenium_driver=driver
)
driver.get('https://www.google.com/')
try:
# Start of Test
report.write_step(
'Testing Search functionality',
status=report.status.Start,
test_number=1
)
search_box = driver.find_element_by_css_selector('input[aria-label="Search"]')
search_box.send_keys('pyhtmlreport is Awesome')
search_box.send_keys(Keys.ENTER)
# Test Steps
results = driver.find_elements_by_css_selector('div[id="search"] div[class="g"]')
assert len(results) > 1
report.write_step(
'Google Search returned more than 1 results',
status=report.status.Pass,
screenshot=True
)
except AssertionError:
report.write_step(
'Google Search did not return any result',
status=report.status.Fail,
screenshot=True
)
except Exception as e:
report.write_step(
f'Something went wrong during execution!</br>{e}',
status=report.status.Warn,
screenshot=True
)
finally:
report.generate_report()
driver.quit()
FAQs
Implement html reporting in Test Automation
We found that pyhtmlreport 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.