Click here to Skip to main content
15,903,854 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Embedding scripting/python into an application - an successful examples? Pin
jschell5-Oct-23 6:03
jschell5-Oct-23 6:03 
GeneralRe: Embedding scripting/python into an application - an successful examples? Pin
charlieg8-Oct-23 8:05
charlieg8-Oct-23 8:05 
GeneralRe: Embedding scripting/python into an application - an successful examples? Pin
Peter Adam5-Oct-23 20:07
professionalPeter Adam5-Oct-23 20:07 
GeneralRe: Embedding scripting/python into an application - an successful examples? Pin
Julie7776-Oct-23 5:44
Julie7776-Oct-23 5:44 
GeneralRe: Embedding scripting/python into an application - an successful examples? Pin
charlieg8-Oct-23 8:11
charlieg8-Oct-23 8:11 
GeneralRe: Embedding scripting/python into an application - an successful examples? Pin
Jeremy Falcon9-Oct-23 3:45
professionalJeremy Falcon9-Oct-23 3:45 
GeneralRe: Embedding scripting/python into an application - an successful examples? Pin
charlieg9-Oct-23 11:02
charlieg9-Oct-23 11:02 
GeneralRe: Embedding scripting/python into an application - an successful examples? Pin
jschell9-Oct-23 5:15
jschell9-Oct-23 5:15 
charlieg wrote:
I am testing a physical system


ah...ok.

charlieg wrote:
Based on my reading, it appears I have to develop an API for the real application that exposes functionality/services to python via an extension


The specifics do in fact depend on the target.

But yes other than that the idea would be correct.

Although I would look more closely into who will be writing those tests also.

I created a system that allowed QA testers to write Word docs which contained individual Test Cases. Between me and the QA testers we came up with a specific form that the Test Cases would follow.

The system tested a phone service box (can't remember the general name but back then companies would buy one of these and stick it in a closet to provide phone/internet.)

The system consisted of the following
1. Various helper libraries/tools. In particular to run two different SSH tools (two were needed because two instances of the same would not work correctly at the same time.) Those were used both to test and drive the hardware.
2. A third party tool called AutoIt. Which still exists. It was used to drive the the UI.
3. The parser/interpreter for the Word docs. Written in perl.

The parser would emit code for AutoIt. I think maybe AutoIt drove everything.

Long time ago.

Only interesting bit is that the hardware did not support IP directly. The UI talked via IP but via a tunneling protocol on one of the other channels. The IP rate was something like 40 bytes a second. (Not meg, not k.))

Worked well because of the two testers one could not program at all. The other could get by but from the QA role using the Word as the source made it much easier to document what was being accomplished for the customer.

-----------------------------------------------
I have done quite a few other solutions with dynamic user driven code. But not for hardware.

I have done it both in C# and Java. For the second the dynamic code was Java. For the first the code was both C# and VB.

At least for Java and C# both support a native API interface.

I worked on one system in C++ which used a knowledge base solution (when those were big) which had its own language. The knowledge base would produce C++. Then I wrote APIs for the difficult pieces which the knowledge base rules would call. One problem with that system is that it did not account for the size of the rule base that we were using (or perhaps the person doing that didn't read all of the docs.) It ended up producing C++ methods that were too big for the compiler to handle. (I had to hack a solution to refactor those those before handing off to the compiler.)

--------------------------------------------------

The problems with such systems.
1. How are programming errors handled? What and how will the user see such problems?
2. How are execution errors handled? When it runs it fails so then what?
3. The people writing the tests will need to some non-trivial programming skills. And this impacts the next part.


People do not tend to excel even if it is possible for them to do so. They just want to get it done. Nothing wrong with that. And for the most part it is better since trying to achieve perfection is seldom worth it.

That however means that, based on the programming skills, they will do things that your system might not be expecting. And that can cause problems.

For example spinning up threads. Or making http/rest/tcp calls to external systems but not doing error handling correctly. Or even silly things like doing a set look up by using a for loop but doing in thousands of times in one execution.

Then they will want you to explain why it isn't working. Or why it is slow.

That is a problem if you did not expect that and plan for it. So you need to plan and I would suggest explicitly document the following
1. Limitations of the system
2. Who is responsible for failures.
3. Escalation process.

As for those external APIs that you might need I would suggest that you also collect plenty of stats:
1. The time it took to execute.
2. When it was called
3. Parameters to it.
4. Return result. At a minimum did it return success.
GeneralWordle 838 Pin
StarNamer@work4-Oct-23 13:19
professionalStarNamer@work4-Oct-23 13:19 
GeneralRe: Wordle 838 Pin
Amarnath S4-Oct-23 14:10
professionalAmarnath S4-Oct-23 14:10 
GeneralRe: Wordle 838 Pin
Shane01034-Oct-23 18:15
Shane01034-Oct-23 18:15 
GeneralRe: Wordle 838 Pin
GKP19924-Oct-23 18:21
professionalGKP19924-Oct-23 18:21 
GeneralRe: Wordle 838 Pin
GuyThiebaut4-Oct-23 20:01
professionalGuyThiebaut4-Oct-23 20:01 
GeneralRe: Wordle 838 Pin
Sander Rossel4-Oct-23 20:19
professionalSander Rossel4-Oct-23 20:19 
GeneralRe: Wordle 838 Pin
ChandraRam4-Oct-23 20:54
ChandraRam4-Oct-23 20:54 
GeneralRe: Wordle 838 Pin
OriginalGriff4-Oct-23 20:56
mveOriginalGriff4-Oct-23 20:56 
GeneralRe: Wordle 838 Pin
Cp-Coder5-Oct-23 1:11
Cp-Coder5-Oct-23 1:11 
GeneralRe: Wordle 838 - 5 4 me Pin
pkfox4-Oct-23 21:08
professionalpkfox4-Oct-23 21:08 
GeneralRe: Wordle 838 Pin
Sandeep Mewara4-Oct-23 22:13
mveSandeep Mewara4-Oct-23 22:13 
GeneralRe: Wordle 838 Pin
Cp-Coder5-Oct-23 1:10
Cp-Coder5-Oct-23 1:10 
GeneralRe: Wordle 838 (SMB/6) Pin
Jeremy Falcon5-Oct-23 2:41
professionalJeremy Falcon5-Oct-23 2:41 
Generalworldle 621 2/6 Pin
jmaida4-Oct-23 11:22
jmaida4-Oct-23 11:22 
General288 Pin DIMMs Pin
C-P-User-34-Oct-23 9:33
C-P-User-34-Oct-23 9:33 
GeneralRe: 288 Pin DIMMs Pin
Dave Kreskowiak4-Oct-23 9:53
mveDave Kreskowiak4-Oct-23 9:53 
GeneralRe: 288 Pin DIMMs Pin
OriginalGriff4-Oct-23 9:59
mveOriginalGriff4-Oct-23 9:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.