pytest-html-nova-act is a pytest plugin that integrates HTML test reporting with Amazon Nova Act SDK capabilities. This plugin enhances pytest-html reports by adding Nova Act-specific features and metadata.
Usage
Requirements
Python 3.11+
pytest 8.0+
pytest-html 4.0+
nova-act 1.0+
Nova Act API key
Visit Nova Act home page to generate your API key and set it to the NOVA_ACT_API_KEY environment variable
The below sample code shows how to create a pytest fixture which instantiates the Nova Act client, starts it, and stops it after the test completes. It also includes an example test.
import pytest
from nova_act import NovaAct, BOOL_SCHEMA
@pytest.fixture()
def nova_session():
nova = NovaAct(
starting_page="https://nova.amazon.com/act",
headless=True
)
nova.start()
yield nova
nova.stop()
def test_example(nova_session):
nova_session.act("Click learn more")
expected = True
result = nova_session.act("Am I on the Amazon AGI Labs page?", schema=BOOL_SCHEMA)
actual = result.matches_schema and result.parsed_response
assert expected == actual
Usage
pytest
Running the pytest command in a valid pytest project and using the pytest configuration and sample code mentioned above will result in:
Run tests using Nova Act
Embed Nova Act SDK logs and screenshots in the pytest-html report file in reports/report.html
pytest-html-nova-act
pytest-html-nova-act is a pytest plugin that integrates HTML test reporting with Amazon Nova Act SDK capabilities. This plugin enhances pytest-html reports by adding Nova Act-specific features and metadata.
Usage
Requirements
NOVA_ACT_API_KEYenvironment variableInstallation
Install via pip:
Configuration
Add to
pytest.ini:Pytest Example
The below sample code shows how to create a pytest fixture which instantiates the Nova Act client, starts it, and stops it after the test completes. It also includes an example test.
Usage
Running the
pytestcommand in a valid pytest project and using the pytest configuration and sample code mentioned above will result in:pytest-htmlreport file inreports/report.htmlResources