Git Product home page Git Product logo

Comments (7)

hassy avatar hassy commented on June 11, 2024

The reason is zero-config discovery of plugins, i.e. as a user you just need to add the name of the plugin + its settings to your test script, and Artillery will know how to load it.

Can you give a bit more detail on why that doesn't work for private plugins?

from artillery-core.

tresor616 avatar tresor616 commented on June 11, 2024

We package our custom packages in scopes/namespaces, e.g. @organization_name/package_name because there could be a clashing name in some of our registered repositories.

Enforcing the prefix "artillery-plugin-" suggests there would be a universal distinct list of package names which is not always the case, take an example with artillery on github, its https://github.com/shoreditch-ops/artillery instead of https://github.com/artillery because many people/namespaces can have the same name.

I need to be sure at all times that when I run npm install, my custom package will be loaded.
I suggest the code below just read the plugin name as provided

...
    let requireString = 'artillery-plugin-' + pluginName;
    let Plugin, plugin;
    try {
      Plugin = require(requireString);
...

I am happy to submit a pull request for this change.

from artillery-core.

hassy avatar hassy commented on June 11, 2024

Cool. Will gladly accept a PR which allows something like:

config:
  plugins:
    some-custom-plugin:
      package: "@prefix/some-package-name"
      option1: "something"
      option2: "somethingElse"
scenarios:
  # ...

To load the plugin from @prefix/some-package-name rather than artillery-plugin-some-custom-plugin.

from artillery-core.

tresor616 avatar tresor616 commented on June 11, 2024

I don't seem to have write access to this repo, I was trying to push a branch

from artillery-core.

hassy avatar hassy commented on June 11, 2024

You need to fork and send a pull request.

On Friday, 28 October 2016, Treasure Mathala [email protected]
wrote:

I don't seem to have write access to this repo, I was trying to push a
branch


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#108 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAF0qV1aauUAnSzaIT2wsnzKcFDrbu1ks5q4bcAgaJpZM4KiXys
.

from artillery-core.

tresor616 avatar tresor616 commented on June 11, 2024

pull request:
#109

from artillery-core.

hassy avatar hassy commented on June 11, 2024

Two things to do before we can close this:

  1. make the trailing slash in the scope attribute optional
  2. document the change

from artillery-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.