### Start RFSwarm Agent with Libraries and Region Source: https://context7.com/damies13/rfswarm/llms.txt Starts an RFSwarm agent, specifying the manager URL, and including SeleniumLibrary and a region tag. Ensure the manager URL is correct and the specified libraries are installed. ```bash rfswarm-agent -m http://manager:8138/ -p "SeleniumLibrary" -p "Region: EU" ``` -------------------------------- ### Run the Manager Source: https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_manager.md Execute the rfswarm command to start the Robot Framework Swarm Manager. This assumes the package has been installed. ```console rfswarm ``` -------------------------------- ### Install Additional Python Packages Source: https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_manager.md If prerequisites are not already installed, use pip to install necessary packages like configparser, setuptools, hashlib, HTTPServer, pillow, and matplotlib. Setuptools is required by hashlib and HTTPServer. ```console pip* install configparser setuptools hashlib HTTPServer pillow matplotlib ``` -------------------------------- ### Agent Connection Output Example Source: https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_agent.md Example output when the agent successfully connects to the rfswarm manager. ```console Robot Framework Swarm: Run Agent Version 0.6.4 Configuration File: /path/to/RFSwarmAgent.ini Manager Connected http://managerhostname:8138/ 2021-02-14 09:44:42 ( 1613259882 ) ``` -------------------------------- ### REST API - Jobs POST Response Example Source: https://context7.com/damies13/rfswarm/llms.txt This is an example response from the /Jobs endpoint, detailing assigned test jobs, start and end times, run names, abort flags, environment variables, and the schedule for each test. ```json { "AgentName": "load-agent-01", "StartTime": 1572057404, "EndTime": 1572064628, "RunName": "Scenario_1572057404", "Abort": false, "UploadMode": "err", "EnvironmentVariables": { "env": { "vartype": "value", "value": "staging" } }, "Schedule": { "1_1": { "ScriptHash": "c4307dee904afe7df89fa33d193a7d30", "Test": "Browse Store Products", "StartTime": 1572057416, "EndTime": 1572064616, "id": "1_1" }, "1_2": { "ScriptHash": "c4307dee904afe7df89fa33d193a7d30", "Test": "Browse Store Products", "StartTime": 1572057428, "EndTime": 1572064628, "id": "1_2" } } } ``` -------------------------------- ### Install python-dev on Debian-based systems Source: https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_agent.md Installs the `python3-dev` package, which `setuptools` may require on Debian-based systems. ```console apt install python3-dev ``` -------------------------------- ### Install Manager Prerequisites Source: https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_reporter.md Install necessary Python packages for the rfswarm manager if they are not already present. Ensure Python 3.9 or higher is installed. ```bash pip* install configparser pillow matplotlib python-docx openpyxl tzlocal>=4.1 ``` -------------------------------- ### Install rfswarm Components via pip Source: https://context7.com/damies13/rfswarm/llms.txt Install the Manager, Agent, and Reporter components using pip. Ensure Python 3.7+ for Manager, 3.6+ for Agent, and 3.9+ for Reporter. Tkinter is required for the Manager GUI. Debian/Ubuntu users may need to install python3-tk separately. ```console # Install Manager (requires tkinter for GUI) pip install rfswarm-manager # Install Agent (on each load-generation machine) pip install rfswarm-agent # Install Reporter pip install rfswarm-reporter # Optional: install desktop icons (Windows/Mac/Linux) rfswarm-manager -c icon # On Debian/Ubuntu, install tkinter separately if needed apt install python3-tk ``` -------------------------------- ### Start rfswarm Agent in XML Fallback Mode Source: https://context7.com/damies13/rfswarm/llms.txt Use this command to start the rfswarm agent in XML fallback mode, which parses output.xml after each iteration. ```bash rfswarm-agent -m http://manager:8138/ -x ``` -------------------------------- ### Install setuptools for psutil on ARM Source: https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_agent.md Installs `setuptools` which may be required for `psutil` compilation on certain platforms like ARM Linux. ```console pip* install setuptools ``` -------------------------------- ### jQuery Animation Prefilter Example Source: https://github.com/damies13/rfswarm/blob/master/Tests/Regression/Reporter/testdata/Issue- An example of a prefilter function used in jQuery animations. Prefilters can modify animation properties or perform setup before an animation starts. ```javascript function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&( .overflow=[h.overflow,h.overflowX,h.overflowY ],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&( l?c=l:le([e],!0),l=e.style.display|| l,c=S.css(e,"display")),"inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))} ``` -------------------------------- ### jQuery Animation Prefilter Example Source: https://github.com/damies13/rfswarm/blob/master/Tests/Regression/Reporter/testdata/Issue- An example of a prefilter function used in jQuery animations. Prefilters can modify animation properties or perform setup before the animation starts. This specific prefilter handles show/hide/toggle animations and manages element display properties. ```javascript function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float"))&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0)}} ``` -------------------------------- ### jQuery Animation Prefilters Source: https://github.com/damies13/rfswarm/blob/master/Tests/Regression/Reporter/testdata/Issue- Functions that run before an animation starts, allowing for setup and modification of animation properties. This example shows prefiltering for show/hide effects and handling display properties. ```javascript prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=S.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float"))&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0)}}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}) ``` -------------------------------- ### jQuery Animation Prefilters Source: https://github.com/damies13/rfswarm/blob/master/Tests/Regression/Reporter/testdata/Issue- Functions that run before an animation starts, allowing for setup and modification of animation properties. The `prefilter` method registers these functions. The example shows a prefilter handling 'show'/'hide' effects and element visibility. ```javascript prefilters: [function(e,t,n){var r,i,o,a,s,u,l,c="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),v=Y.get(e,"fxshow");for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||S.style(e,r)}if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d))for(r in c&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Y.get(e,"display")),"none"===(c=S.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||"",c=S.css(e,"display"))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float"))&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)S.style(e,r,d[r])})),u=ct(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0)}]},prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}) ``` -------------------------------- ### Example Reporter Configuration File Source: https://github.com/damies13/rfswarm/blob/master/Doc/configuration_files_reporter.md This is a complete example of a Reporter configuration file, demonstrating the INI format and various section types like Report, Data Table, Note, and Errors. ```ini [Report] order = FE084ACBCC8,FD477088D4F,FE35765B841 title = Template Title timezone = Europe/Warsaw dateformat = yyyy-mm-dd timeformat = HH:MM startoffset = -43 showstarttime = -1 endoffset = 47 showtlogo = 1 font = Verdana fontsize = 12 percentile = 90 hcolour = x3503fcb1 tlogo = ..\current_page_1.jpg [FD477088D4F] name = Test Result Summary parent = TOP type = table changed = 1746909845.4730191 colours = 1 datatype = Metric col_result_name_show = 1 col_minimum_show = 1 col_average_show = 1 col_90x37ile_show = 1 col_maximum_show = 1 col_std_dev_show = 1 col_pass_show = 1 col_fail_show = 1 col_other_show = 0 sql = SELECT PrimaryMetric , PrimaryMetric as x91Colourx93 , min(CAST(MetricValue AS NUMERIC)) AS 'Minimum' , ... filteragent = filtertype = None col_primarymetric_show = 1 col_metrictype_show = 1 col_secondarymetric_show = 1 col_metricvalue_show = 1 filterpattern = metrictype = Summary secondarymetric = EntryTime isnumeric = 1 showcount = 1 primarymetric = enablefilteragent = 0 col_agent_show = 1 [FE084ACBCC8] name = Note parent = TOP type = note changed = 1746900650.1195264 note = Test_Note 123 x35$x37x12 [Colours] defcolours = x35000000,x35008450,x35B81D13,x35EFB700, ... namecolours = ... [FE35765B841] name = Error parent = TOP type = errors changed = 1746909832.5245595 images = 1 grouprn = 1 groupet = 1 sql = SELECT r.script_index || '_' || r.robot || '_' || r.iteration || '_' || r.sequence 'id' , r.result_name , r.script_index , r.robot , r.iteration , r.sequence , mt.SecondaryMetric 'script' , mt.MetricValue 'test_name' FROM Results r LEFT JOIN MetricData mt on mt.PrimaryMetric = r.script_index AND mt.MetricType = 'Scenario_Test' WHERE r.result = 'FAIL' AND r.end_time >= 1746088783 AND r.end_time <= 1746088860 ORDER BY x91idx93 ASC ``` -------------------------------- ### S (Setup/Initialization) Function Source: https://github.com/damies13/rfswarm/blob/master/Tests/Regression/Reporter/testdata/Issue- Performs setup or initialization tasks, potentially related to decompression or file handling. It checks flags and processes data based on specific conditions. ```javascript S=function(){var e,r,n,t,o,i,a=[];if(8&A&&(a[0]=f(),a[1]=f(),a[2]=f(),a[3]=f(),80===a[0]&&75===a[1]&&7===a[2]&&8===a[3]?(e=f(),e|=f()<<8,e|=f()<<16,e|=f()<<24):e=a[0]|a[1]<<8|a[2]<<16|a[3]<<24,r=f(),r|=f()<<8,r|=f()<<16,r|=f()<<24,n=f(),n|=f()<<8,n|=f()<<16,n|=f()<<24),L&&v(),a[0]=f(),8===a[0]){if(A=f(),f(),f(),f(),f(),f(),t=f(),4&A)for(a[0]=f(),a[2]=f(),H=a[0]+256*a[1],o=0;H>o;o++)f();if(8&A)for(o=0,N=[],i=f();i;)( "7"===i||":"===i)&&(o=0),u-1>o&&(N[o++]=i),i=f();if(16&A)for(i=f();i;)i=f();2&A&&(f(),f()),C(),e=f(),e|=f()<<8,e|=f()<<16,e|=f()<<24,n=f(),n|=f()<<8,n|=f()<<16,n|=f()<<24,L&&v()}} ``` -------------------------------- ### Get Current Timestamp Source: https://github.com/damies13/rfswarm/blob/master/Tests/Regression/Reporter/testdata/Issue- Utility function to get the current timestamp, used for starting animation timers. ```javascript function ut(){ return C.setTimeout(function(){tt=void 0}),tt=Date.now() } ``` -------------------------------- ### Registering Animation Prefilters Source: https://github.com/damies13/rfswarm/blob/master/Tests/Regression/Reporter/testdata/Issue- Prefilters can modify animation properties or perform setup before an animation starts. Useful for complex setup or conditional animation logic. ```javascript ft.prefilters=[ function(e,t,n){ var r,i,o,a,s,u,l,c,f="width"in t||"height"in t, p=this, d={}, h=e.style, g=e.nodeType&&ae(e), v=Y.get(e,"fxshow"); for(r in n.queue||(null==(a=S._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++, p.always(function(){p.always(function(){a.unqueued--,S.queue(e,"fx").length||a.empty.fire()})}) ) if(i=t[r],ot.test(i)){ if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){ if("show"!==i||!v||void 0===v[r])continue; g=!0 } d[r]=v&&v[r]|| S.style(e,r)} if((u=!S.isEmptyObject(t))||!S.isEmptyObject(d)) for(r in f&&1===e.nodeType&&( n.overflow=[h.overflow,h.overflowX,h.overflowY], null==(l=v&&v.display)&&(l=Y.get(e,"display")), "none"===(c=S.css(e,"display"))&&( l?c=l:le([e],!0),c=S.css(e,"display"),le([e])) ), ("inline"===c||"inline-block"===c&&null!=l)&&"none"===S.css(e,"float")&& (u|| (p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)) ), h.display="inline-block" ), n.overflow&& (h.overflow="hidden",p.always(function(){ h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2] })), u=!1, d) u|| (v?"hidden"in v&&(g=v.hidden):v=Y.access(e,"fxshow",{display:l}),o&& (v.hidden=!g), g&&le([e],!0)), u=ct(g?v[r]:0,r,p), r in v|| (v[r]=u.start,g&& (u.end=u.start,u.start=0)) } }, prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)} ] ``` -------------------------------- ### Initial rfswarm-agent Run Source: https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_agent.md Runs the rfswarm-agent for the first time. This will generate a configuration file and display its location. Press CTRL+c to stop. ```console rfswarm-agent ``` -------------------------------- ### Running a Robot Framework Test Case Source: https://github.com/damies13/rfswarm/blob/master/Doc/rfswarm_agent.md Demonstrates how to run a specific Robot Framework test case from the command line. Ensure Robot Framework and necessary libraries are installed. ```console robot -t "test case" script.robot ``` -------------------------------- ### jQuery Animation Prefilter Example Source: https://github.com/damies13/rfswarm/blob/master/Tests/Regression/Reporter/testdata/Issue- A prefilter function that can be used to intercept and modify animations before they start. This example handles 'show', 'hide', and 'toggle' for properties, and manages display styles. ```javascript function prefilter(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)} S.Animation=S.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"],e=e.match(P)):e=e.match(P);for(var n,r=0,i=e.length;r:\x20\t\r\n\f]*) [\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1