 Okay, so hi, I'm Ralph from Keysight Technologies. I'm a software developer and I'm here to introduce to you OpenTab, which is an open source test automation project we have been working on. It was just released as open source last May, so we are really excited to get to present this system to you. It's based on a test and measurement sequencer and the libraries associated with it. So I'll just quickly explain what is OpenTab and then go through a short demo afterwards. So as I said, I work at Keysight Technologies and this OpenTab is one of the first software projects that are open source that we're doing. So Keysight Technologies is an electronics test and measurement company and some of our products are these instruments you see out here to the right. It's measurement equipment and of course that includes some software component as well. So you really need to control these instruments and that's where you need a test sequencer basically to set up your tests. So our ambition is really to create the best test and measurement solutions. So to have that we believe you need the best hardware and you need the best software and we strongly believe that parts of having the best software is embracing the open source concept wherever you know when it kind of makes sense and we believe that OpenTab is a project where it really makes good sense to do open source. So we have identified something we call the Automation Challenge and it's something we noticed nine years ago when we actually started this test sequencer project and the thing is that the ecosystem of test sequencers is split between homegrown solutions and proprietary solutions and so the homegrown solutions have the problem that they're often very costly or very error prone. You can have maybe very cheap software if it includes a lot of box or a very expensive software it is absolutely not acceptable to have any box. And then you have the proprietary hardware software that kind of forces you into this vendor login situation where you're not maybe able to extend this with new hardware and new devices and you also have the problem that if the vendor stops maintaining it you're pretty much lost if you need some box repaired. So what we saw was and this also actually applied to our own company is that often companies start making new test solutions that are all very similar. It has the same kind of GUIs, the same kind of device drivers, the same kind of logging and result capabilities and that's really not what we thought was a very good situation and so what we wanted is to help people kind of leverage the work of others and kind of to help those people who have one specific device they're working with that they can just kind of focus on that, be the experts on that device. So our goal is to make test and measurement automation effortless and we have some ideals that it kind of applies to all software I think but for OpenTab especially it's simplicity if you don't really need it it shouldn't be in your way and that comes into that we have a modular architecture that kind of handles this and the same goes for the scalability it should be lightweight and integrate well with other things you should be able to fire it up in a docker container you know run it on an Android phone or you know a desktop computer or what have you and then lastly speed is very important for tests and I mean if you're doing manufacturing you need to make sure that the test goes as fast as possible and of course also a very important thing is the speed of development how many man hours do you need. So what is OpenTab? OpenTab is really based around a test sequencer so it's a software right. It has a kind of modular a very modular actually plug-in architecture that allows you to kind of extend many aspects of it with the custom code it's developer friendly and that's very important right because we want people to develop plugins for this so we really develop this with a developer first mindset it's a growing community and these over here you see are some of the people who are involved and you know people who are interested in doing tests in the best way right and so it's based on .NET standard which is the open source .NET runtime from Microsoft and it supports we support Windows and Linux and it's open source under the MPLv2 license and it has you know we use the open core kind of you know strategy so you know OpenTab is open source and we have some proprietary software as well that you can get but we also have a lot of like open source plugins for it that you can use and in this demo and in this talk today I will only be talking about the open source stuff all this so yeah so I'm really excited about this software because I have I have you know I've been developing test solutions myself and I really you know enjoy having to work with some software that is developed with the developer friendly mindset yeah and actually also it kind of you know we started coming to Fustum a couple of years ago and Fustum was also one of the things that kind of inspired us to start you know looking at an open source solution to this so what's a test sequencer? A test sequencer is a piece of software that can be used to create, modify and run a sequence of test steps so some important concepts here are a test plan which is a sequence of test steps right at the test steps themselves which encapsulate some piece of functionality it could be a measurement or some hardware control it's also important you know have to read some resources you have your devices under tests dots you have your measurement instruments you have your result listeners for processing and storing results yeah so and up here in the corner we will kind of talk more about that but that's that's to show you kind of the it's kind of a modular architecture right and here you know it's just a picture of you know that you know the test steps themselves they are up in the corner and you know those are like plugins you put into the system to build your solution okay so test steps and test plans so test steps are like the atoms of OpenTap it's really how you kind of build your test sequence so as I said test steps encapsulate some functionality they have some settings like you know which frequency are you measuring or something like that and they sometimes use resources if it's a measurement they use resources or if they control some piece of hardware and they can also have child steps so it's kind of a recursive system right steps can have child steps kind of child steps and yeah so they are all inside this test plan which is a sequence of test steps and they the test plan kind of manages the you know control you when to connect to instruments and disconnect and so forth and on the right side here you see just an example of some test steps you know you have some hierarchies and stuff going on so we talk a bit about test execution flow just to explain a bit how these things work so here you have like this kind of very simple test plan of free test steps that we just want to run after each other and so first the test plan will kind of figure out which are the required resources for this test plan and then it will open those or connect to them it depends a bit on what kind of instrument like is it a you know it's an SQL database you want to publish results to or is it like a USB device or something like that you know it takes some time to open your resources and that's why this kind of happens in parallel then you come to your test execution phase where you run all the steps here in sequence and finally you close all the resources that we're using and so this all these flow things we have here they can actually be modified by as and so just to be clear so this here or here marks kind of the end of the test plan run right and so but all these flow things can actually be modified by plugins you can make a plugin that makes you know the only the resources associated to a specific step that it only opens before the step runs and after the step closes like if you have a very long running test plan maybe you don't want to take up the resources for the whole length of the test plan to more finally control it and that can be done using plugins yes then we have some results results are very important this could just be so results comes from test steps and this could just be a verdict like a pass or fail or it could be the results of some measurements here I'm showing just some the measurements that I'm making in the demo later or it could be a simple log message so we have I guess this message passing system with some specific rules for how to how results flow through the system to kind of make sure that results are processed in the most optimal way and not kind of blocking the test plan execution time but kind of it's shipped away on different threads to process that as efficiently as possible okay so this slide here is kind of the core idea of OpenTap you can say you can see all these so OpenTap is actually being developed in Denmark that's why we use all these Lego bricks so but it's kind of the metaphor right so if you look at the like you have to test the plugins you have your resource plugins you have your user interfaces and your result listener plugins all different kind of parts of the system right and you can see the different colors bricks are kind of the different plugins you can have and the color they have this has no really not really any significance yeah so an important thing here is like how does the different parts communicate so you can see the user interface that's an arrow going to the OpenTap brick right and that's because that kind of communication is isolated and that's also for the result listener plugins that's also kind of isolated that communication so there's no direct communication between the test steps and the result listeners for example so the results are kind of so that's kind of encapsulated but then if you look at the test step plugins and the resource plugins you can see this arrow here and that's because like test steps talk directly to instruments for example and then we have some plugins that kind of fall out of the category you know like a Python plugin we have like a Python plugin kind of allows you to implement all the other kinds of plugins but instead of in C sharp you can now implement them in Python okay so you take these bricks and you kind of put them together and then you kind of create your solution so your plugin you probably have some code that you need because maybe you know how to control your device or your instrument or maybe you just have some special things you need it could also be just a special kinds of results you want a special database you want to store your results in or something like that so that this is kind of the idea right you put together your solution and then you can find a lot of bricks for your solution at the packages.OpenTab.io this is our main package repository and so if you go and develop your own plugins you can also get it into this repository and share it with people so it's just like you know a package manager just for tab okay so then I'll go through a couple of cases of things that have been developed with OpenTab so here's something called the triangle project which is an EU project that uses OpenTab to do a benchmark on phones so you kind of connect your phone and you can run some tests that tries to figure out the performance characteristics of this phone and give it like a rating so this is a very good phone or is it a bad phone so things that you know you can measure like battery drain and UI frame rate and stuff like that and so the thing that Tab does is control this sequence of test steps that tells the dot to maybe start or maybe it tells an instrument to start measuring the current drain of the phone or something like that and then in the meantime go to YouTube and watch a video and see how that affects the battery drain and things like that is what this kind of project has been doing and I think yeah so it's kind of a very complex scenario where you have a very complex system that you're trying to measure some of these parameters on and down here you can see this is just to show this is kind of a solution with your bricks so then we have another thing is Web API tester and that's something that's under development and it's a plugin for testing HTTP APIs like RISC so you can make a test plan that then sends some RISC requests to the server and that's just test steps for OpenTab just test a plugin to put in write your URL and your endpoint and then you can get the data back and you know to try to figure out you make a script that basically says this was the expected result and the GUI you see here is our open source text-based UI and I think it looks old school but it's quite convenient because it's really fast and it's also if you have like a docker running you can SSH into it and open this GUI and look at your test plans and so this is a pretty simple solution with only like four basic components here and then finally we have the subject of our demo which is a little like a hardware device called Pocket Science Lab developed by Open Source hardware that's developed by FOSSAsia and it has some simple oscilloscopes and waveform generator things on it and we thought it would be fun we saw it last year here in Fossdom and talked to the people and we thought it would be fun to kind of use it for our demo and so what we are going to do is well I forgot to find the thing actually okay so what we'll do is connect the wave generator to the oscilloscope channel 1 and channel 2 and then we'll connect it to the PC and then we'll do some of these we'll try to do like a frequency sweep and a phase sweep on the wave generator and see what happens so yeah I'll just find the device because I forgot to take it out of my backpack yeah so here it is I'll connect these first yeah okay sorry about that and there we go so I have if you can see my screen okay it's pretty small here I have some code basically it's a class that implements a test tab in the open tab and I will just compile it I have this in there so this this project here like a C sharp project and a python project and it contains the driver for the instrument and some test steps to do some measurements on the instrument and yeah so so now I compiled it and the project itself includes the open tab nugget package which means that open tab gets deployed into my debug folder here so you can see if I do a I don't know if you've been I think it's okay this is my debug folder I have tab.exe here that's how you're basically your entry point to open tab and then I have the pslcs test which is the DLL that contains my plugins but I need some kind of graphical user interface to create a test plan so I'll just install the Tui okay and then I also need so now I've installed the user interface and then I also need a sv file for saving results so I'll also install that plugin and then sql light and sql like that okay so now we want to create our test plan I'll open up the user interface this is like the old school one I'm using you also have like you know some like an editor like you can download that community edition editor if you want and then I'll create my test plan so I'll just create a sign setup sign generator step that sets up the like sign waves on the generator and you can see over here on the settings we need an instrument and set up the channel and the frequency and channel the channel is fine so I'll just call this like a thousand hertz and then I'll go and add the instrument here so now we have this instrument in our instrument settings oh and then I will also go and add the results csv database sql light database and you can see the settings for those okay and then I just need to go and configure this okay so now this step is configured but we also need to configure something so I'll add the measure samples step and the measure sample step you know it's just like measures on samples with the oscilloscope basic stuff symbol tap plan okay I quit here alright so now I'll just use the cli to run the test plan so I'll just like this I don't need it right now okay so yeah so you can see it ran the test plan this is just a log file and the results that the csv file result is now saving is inside this result folder so just write this trace like that fire up excel you can use whatever you want and I'll just like plot this scalar chart so yeah that looks like what you'd expect from like a sine wave 10,000 samples so let's try to create something a bit more advanced I'll open up my test plan again here and let's create a new test step so we'll use one of the things from open type itself which is the sweep loop this is essentially just a plugin from the basic steps so sweep loop can sweep across a property that's a setting so when I add and so I have this step called measure rms voltage that I'll put into the sweep loop as a child step and the measure rms voltage will measure rms voltage on the you know the oscilloscope and set the frequency on the generator and it's a kind of assume that those two are connected and so these are the settings for this step so I'll go to the sweep that was actually the that was the wrong sweep loop I added we can do that in another demo sweep loop range it's a bit simpler to explain what goes on there okay so then I select for sweep loop range I will select sweep frequency as a parameter and let's start at 100 hertz and finish at because this device in the specs it says that it goes up to 5000 hertz so let's just test that it also that it works at that level okay looks good and we'll save it and go to the command line again and then run it so now we're sweeping across frequencies you can see the hertz out here we've done an exponential sweep but I think this gets the point of course okay then we can look at the results again insert scatter chart okay so what we have here is the RMS voltage at all the different frequencies and you can see here around 5000 it kind of starts trailing off right so the the output of the generator starts to go down as we exceed the limit of the generator and so you can say maybe you could kind of calibrate that out to boost the signal or something but we also don't know if there's any distortion going on or something like that so that would be another another test you would make okay so another thing I have you just maybe delete these two so I also have something that can measure the difference in the phases because actually there's two generators and two oscilloscopes so if we just connect those together we can try to sweep the phase of the generators because the generators are kind of locked in phase but you can kind of decide how much you want to shift the phase so let's just add this one again sweep blue brains and now we'll sweep the phase and we'll sweep from 0 to 360 it's 30 degrees and it will do just 13 points so we have a step size of 30 and we're measuring 0 and 360 so it actually remain that measurement twice and then I'll publish this yes let's try to run so we can go and look at the results again difference rms I think and there you can see so I'm subtracting the two signals from each other and so you can see when the phase is 0 they are exactly on top of each other there's 0 voltage difference between them and then when the phase is 180 here there is 100% phase difference between them and you get a peak that's around 4.4 volts so those are some of the basic things you can do so another thing is for example the REST API plugin you could just put in the REST test it instead to test your web server for example and then it's not similar to using postman or something like that you can set up your requests but then the nice thing is that we have the CLI tool so you can just run your test plan so maybe a quick last thing we have these community addition tools here that you can also use as part of a product we have tab editor open so here you can see the same test plan that we had before just in a different style of GUI but then we can open the remember I attached the SQLite database anyone can really use that so here are the results from the different runs we had and it's pretty convenient but then you can go and see the results from the test plan they look like this this is the phase difference we saw if you go to that's the voltage difference but then this is also a bit interesting I think if you split this on the phase maybe we'll check the line chart here this seems to be a bit of an error but then you can see we've got like a completely correlation between the voltages on both axes they are completely correlated and then as the phase moves towards it gets like elliptical and then as the phase moves towards like 180 degrees it kind of turns into an ellipsis that turns on the a line that what do you call it 90 degrees compared to it this here is at 45 degrees or 230 just a little curiosity I like this chart I'm not sure it's actually useful for anything I just like looking at it that's my demo basically so thank you for your attention here's some info commenters if you're interested commenters in building K we have a stand up in the like close to the like back entrance and if someone of you is really interested in OpenTab and test automation we have this developer camp in September you can come and talk to if that's of interest thanks