How to write my own engine? Docs?
See original GitHub issueHi i found the repository “https://github.com/shoreditch-ops/artillery-engine-kinesis” which seems to solve exactly what i need - writing my own engine… I did it already by forking the whole artillery repository and got it running, but it feels as a total overkill to fork the whole thing just to introduce a new engine.
But when i see code like this:
let runnerEngines = _.map(
Object.assign({}, Engines, runnableScript.config.engines),
function loadEngine(engineConfig, engineName) {
let moduleName = 'artillery-engine-' + engineName;
try {
if (Engines[engineName]) {
moduleName = './engine_' + engineName;
}
let Engine = require(moduleName);
....
-> the runner code is hardcoded looking into his own folder relatively with all the entries of “Engines”… i don’t see how this should be dynamically able to pick up some new written engines at all oO
So… how should this work?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Write Your Own Game Engine - Shahriar Shahrabi
Short list of resources and tutorials for writing your own game engine in OpenGl and C++.
Read more >How I made a DOCUMENTATION WEBSITE for my Game ...
For all your web hosting needs (use coupon code CHERNO for a discount) ▻ https://hostinger.com/chernoPatreon ...
Read more >Writing a Game Engine from Scratch - Part 1: Messaging
Writing an Engine from scratch can be a daunting task. With a good architectural design and adapted mindset, it is both interesting and ......
Read more >How to Write Your Own C++ Game Engine
Use an Iterative Approach · Started factoring out vector and matrix functions into my own 3D math library. · Replaced the . ·...
Read more >Making Your Own Video Game Engine: The Beginners Guide
Learn how to make your own game engine. Determine whether you should build your own game engine and what you need to succeed....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another way to do this is to create a package that has a dependency on both artillery and your custom engine (could be installed from
./artillery-engine-custom
), this way artillery core will be able to require in your custom engine correctly.In your root project folder:
my-script.yml
An artillery script using your custom engine.
package.json
A directory called
artillery-engine-custom
This should be a module named “artillery-engine-custom” which main script should export an engine.
Ah sorry, the engine needs to be specified in
config.engines
like this:I was able to run your script + engine after adding that bit to the config. Let me know if you run into any other issues!