Skip to content

Can't save or run tests on webpack compiled scripts #1092

Open
@ckbedwell

Description

@ckbedwell

Problem

If using webpack-compiled scripts that obfuscate the code, we make assumptions on the frontend that it is invalid script when in fact it isn't.

This problem applies to:

  1. Script does not export any options
  2. Script must set the type to chromium in the browser options.
  3. Script must import { browser } from 'k6/browser'

The scripted input with a valid webpack compiled script showing an error saying 'Script does not export any options'.

Acceptance criteria

There isn't a clear solution for this problem. The acceptance criteria will be allowing perfectly valid compiled scripts to run and be saved. Potential solutions include:

  • Make this validation to be optional or dismissable
  • more intelligent detection on the FE that the script is valid (I think this is a giant can of worms...)
  • have a sandboxed api that can be called upon to validate scripts

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions