How to Write Browser Tests on Custom Theme?
I Would recommend reading
https://www.previousnext.com.au/blog/introducing-drupal-testing-traits-drupal-extension-testing-existing-sites
in this article it explains using https://gitlab.com/weitzman/drupal-test-traits
in this way you can do...
use weitzman\DrupalTestTraits\ExistingSiteBase;

/**
 * Test webform on theme
 */
class WebformValidationTest extends ExistingSiteBase
{
    public function testThemeFormPage()
    {
        $this-&gt;drupalGet('/page-that-displays-form');
        // Assert stuff here.
    }
}