❕NEWS – Israeli central bank tests digital shekel using Ethereum | Proxies-free

Globes , A financial newspaper based in Tell Aviv has revealed that the Israeli bank are testing their digital Shekel in a private ethereum ecosystem.

It has been long since the blockchain world saw new CBDC built but this new plan by Israeli to have their own digital Shekel may open doors for more country to follow suit.

What do you think about it ?

testing – If you had a medium size company, several developers – but zero tests written in your REST API’s – where would you start?

I am looking to identify a benchmark to shoot for, and to come up with a decent game plan for introducing tests into our systems before deploying new code.

Just some backstory

My employer is not a tech company and our end users are inside the organization, we are just a department of 2-4 developers supporting a medium sized Corporation – but periodically the pain is really really felt when we roll out large software updates that span over multiple systems. The lack of tests usually leaves us fixing small issues that come up later for several days after a release, and makes us look bad sometimes (old features that people rely on break) after big wins (new features are introduced that people love).

My company uses a Microservice Architecture, every backend service is a stateless REST API we have about (12) backend services. We have (3) user facing websites written in several different languages that our company uses internally to do lots of their work in. The more and more we develop, the more and more people depend on our products, and the more and more it’s going to be imperative that our services are working going forward.

In my mind, if we stopped everything we are doing and just wrote tests until I felt “safe” and that I had adequate testing for all of our infrastructure, it would take us up to 2 years to write them all. Thats just not something we can convince our co workers and executives to wait for.

If you were in our shoes, what sort of tests would you begin to write? Would you start with end to end testing? Like in each app, write tests to make sure that the app is able to query or update the other apps it communicates with?

Would you write tests inside something like Postman, and hit every API endpoint to see if its alive?

Or would you start internally for each app? Write things like unit tests for each function, or each REST API endpoint to ensure that each endpoint is working as expected?

there are so many places where work needs to be done, and its daunting to come up with a starting point where it would feel like we are making felt progress

Is there a simple algorithm for generating unit tests given a function’s code?

Given the abstract syntax tree (AST) of each line of a function’s code, I am asked to generate code for that function’s corresponding unit tests, similar to what Microsoft’s IntelliTest tool does here: https://docs.microsoft.com/en-us/visualstudio/test/generate-unit-tests-for-your-code-with-intellitest?view=vs-2019.

The issue is that I have to implement this from scratch instead of using built-in tools, since my project is implementing an ABAP to C# interpreter (ABAP is a programming language used for SAP’s enterprise software), which executes ABAP code in C#, so I cannot just use an IDE’s unit test generation tool.

I so far have decided that the first part of the algorithm is to generate the function’s parameters, but I’m not sure how I’m going to generate the function’s parameters exactly. Furthermore, I don’t know how the unit test generator is going to compute the expected outputs of the function.

Note: This algorithm doesn’t need to be an algorithm that works as well as an IDE’s automatic unit test generation, I just need to be able to come up with an algorithm that is an initial working prototype. But so far, I am stumped, and haven’t found any good online resources regarding this topic.

programming languages – Is there a simple algorithm for generating unit tests given a function’s code?

Given the abstract syntax tree (AST) of each line of a function’s code, I am asked to generate code for that function’s corresponding unit tests, similar to what Microsoft’s IntelliTest tool does here: https://docs.microsoft.com/en-us/visualstudio/test/generate-unit-tests-for-your-code-with-intellitest?view=vs-2019.

The issue is that I have to implement this from scratch instead of using built-in tools, since my project is implementing an ABAP to C# interpreter (ABAP is a programming language used for SAP’s enterprise software), which executes ABAP code in C#, so I cannot just use an IDE’s unit test generation tool.

I so far have decided that the first part of the algorithm is to generate the function’s parameters, but I’m not sure how I’m going to generate the function’s parameters exactly. Furthermore, I don’t know how the unit test generator is going to compute the expected outputs of the function.

Note: This algorithm doesn’t need to be an algorithm that works as well as an IDE’s automatic unit test generation, I just need to be able to come up with an algorithm that is an initial working prototype. But so far, I am stumped, and haven’t found any good online resources regarding this topic.

usability testing – Being told to moderate other designer’s tests

I want to ask if this is common practice or even a good practice.

On my ux team, we are being told that no one will moderate usability tests for their own projects. We will do all the work and prep for the tests such as figuring out tasks and writing the script but another designer from the team who has no knowledge or involvement on the project will conduct and moderate the tests.

Does this make sense? Their justification is that this will remove bias and stop the moderator from doing things like hinting to users to click that button or things like that. Which I find ridiculous that a moderator would not know to ask leading questions. I think it’s a waste of time to have to learn someone else’s project just to do moderating and never to be involved in that project again. Some people on the team and upper management believe having someone who doesn’t know the project doing the moderating is best practice because this is what they learned from a ux boot camp course.

My team wants proof that other ux teams do not work this way or UXers believe otherwise.

How does your team work? What do you think about this?

node.js – Is it possible to run Selenium like tests in a Windows Docker Container

we have a Windows Electron application that runs e2e Tests via Spectron. The application is platform dependent and won’t run on Linux (Containers). We want to run our Spectron e2e Tests inside a preconfigured docker container to have them isolated.
To get a grasp of it I have built a minimal nodejs application which does basically nothing and has a e2e test (jest) that opens a browser tab and checks the title, no functionality just a simple spike.

I created a dockerfile to build a container to run the tests:

FROM  mcr.microsoft.com/windows:20H2-amd64
 
RUN mkdir "C:/app"
WORKDIR "C:/app"
COPY app "C:/app"
 
RUN powershell -Command 
    Set-ExecutionPolicy unrestricted; 
 
ENV chocolateyUseWindowsCompression false
RUN powershell -Command 
    iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')); 
 
RUN choco install googlechrome -y --version=91.0.4472.101 --ignore-checksums
RUN choco install chromedriver -y --version=91.0.4472.1010 --ignore-checksums
RUN choco install nodejs-lts -y --version=14.17.1
 
RUN npm config set strict-ssl false
RUN npm install 
 
ENTRYPOINT npm test

Note this is a Windows container, as our main app will also need a Windows container to run. The container builds and runs the test but crashes with the error: SessionNotCreatedError: session not created thrown by from tab crashed. On my Windows Host the test runs fine.

Is there anything wrong with my dockerfile or is this simply not possibly in a Windows container?

I don’t think it’s relevant to the problem but here is also the testfile that gets executed when the container does npm test:

describe('test google.com', () => {
    const {
        Builder,
        By,
        Key,
        until
    } = require('selenium-webdriver');
    var driver;
 
    beforeEach(() => {
        driver = new Builder()
            .forBrowser('chrome')
            .build();
    });
 
    afterEach(() => {
        driver.quit();
    });
 
    it('should open google search', async () => {
        await driver.get('http://www.google.com');
        driver
            .getTitle()
            .then(title => {
                expect(title).toEqual('Google');
            });
    });
 
});

PHPUnit Plugin Integration Tests: Getting wordpress-tests-lib PHP into IDE (VS Code)

The best solution I’ve found is to make a symlink from the plugin directory to the actual location of the /wordpress-tests-lib/.

At least in the case of VS Code, the symlink seems to help it “find” the files and incorporate them into autocomplete etc. I’m still having bugs but this is the best I could do.

Find the temporary directory

There’s probably a smarter way, but I found my test dir by just echoing it out to the terminal when I run phpunit.

Edit the bootstrap.php file from your plugin like so:

add echo "$_tests_dir" after the variable is set up

Then run phpunit in the terminal and copy your path URL. Mine (mac) is

/var/folders/sn/y4jh01gs67xbbdh2v7zy_86w0000gn/T/wordpress-tests-lib

Add the symlink to the plugin dir

Open your plugin in the terminal and add the link with the following command:

ln -s /PATH/ _wordpress-tests-lib

You can use a different link string if you want, it shouldn’t matter.

So here’s the actual command I ran:

ln -s /var/folders/sn/y4jh01gs67xbbdh2v7zy_86w0000gn/T/wordpress-tests-lib/ _wordpress-tests-lib

After this I restarted my IDE to ensure it rescanned the directories, and the class was no longer marked as undefined.

Add the symlink to .gitignore

For bonus points, you can block the symlink from showing up in Git, which you probably want because it will be pointing to a directory that is system-specific.

Just add _wordpress-tests-lib to a new line in your .gitignore file and commit the change.

To seperate one badblocks test on entire drive to multiple tests, Is that good idea to create temp partitions and test on them?

I would like to run badblocks on one entire hard drive (8TB). For example:

$ sudo badblocks -wsv /dev/sdb

But, this will take days to complete. For some reasons, I can not leave the test PC on for days. I have to shut it down everyday.

Is that a good idea to create some temp partitions, for example format the drive to 8 fat32 partitions and then run badblocks on each partition instead:

$ sudo badblocks -wsv /dev/sdb1
$ sudo badblocks -wsv /dev/sdb2
$ sudo badblocks -wsv /dev/sdb3
$ sudo badblocks -wsv /dev/sdb4
$ sudo badblocks -wsv /dev/sdb5
$ sudo badblocks -wsv /dev/sdb6
$ sudo badblocks -wsv /dev/sdb7
$ sudo badblocks -wsv /dev/sdb8

In such case, I can power off the test PC after each badblocks on each partition.

After all tests are completed, I will reformat the drive to one single partiton with proper filesystem on it later.

Is this a good idea?

Thanks a lot.

user research – Are remote preference tests (A vs. B) always flawed because of learning effect?

I too have wondered about this before, not sure I really have the answer but maybe too extensive for a comment…

My first thought would have been to set up two test groups: One starting with A the other starting with B just as you stated in your possible solutions. With the results of both groups combined, we can probably assume, negates the learning effect.

I’m also not certain that randomizing the tasks would yield an accurate result (80% starting on A could still happen randomly i suppose?), think sequential alternation of start task would give you a more balanced 50/50 view, of course this becomes more complicated when you have more than 2 tasks (A/B/C…).