Page MenuHomePhabricator

Outreachy microtask: Automation testing framework setup and running existing Echo node.js tests (#1)
Closed, ResolvedPublic

Description

This is a microtask for Outreachy applicants for T204068: QA: Automation Testing - port Echo Notification tests to Node.js.

  • Set up local development environment - refer to MediaWiki-Vagrant
  • Enable Echo role
  • Run existing Echo node.js tests in your local environment
  • Document your steps and what improvements/additions to the current documentation you'd make.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

@etonkoviova I am an outreachy aspirant and interest in contributing to this project. I am new to selenium and Node.js both, but would like to learn. Would like to start with this task.

@Aknkb - thank you for your interest! Please start with the microtasks listed in this project task.

@Aknkb I have written Selenium/Node.js documentation, let me know if you have any questions.

This comment was removed by Aknkb.

@zeljkofilipin Thanks I am setting up the dev environment, I will soon have a look.

Hi @Etonkovidova, @zeljkofilipin
I am an Outreachy aspirant for this round, with a slight background in npm, Node.js and Selenium testing. I find this project interesting and it'd be really great to work on it, this fall.
I've already gone through some sections of the documentation written by @zeljkofilipin while I was starting off with Selenium, and they've actually helped me a lot. Now, I'll start with this microtask. By the way, may I ask for your suggestion on which OS would be better for this, Ubuntu or Windows 10?

Hello @Etonkovidova, @zeljkofilipin,
I too am outreachy aspirant. I have setup local dev environment and enabled echo role too by following media-wiki docs. But when i run

npm run selenium

I am getting this

> @ selenium /vagrant/mediawiki
> bash ./tests/selenium/selenium.sh

chromedriver running with PID 9727
Starting ChromeDriver 2.40 on port 4444
Only local connections are allowed.

> @ selenium-test /vagrant/mediawiki
> wdio ./tests/selenium/wdio.conf.js

Very first time a chromium browser popped up but running it again I am not seeing anything.

  1. Do we need to import data too to run the tests ?
  2. And where we need to document our steps ?
  3. I was unable to find any gmail group upon clicking the link given there on outreachy page.

@iitannu: If you followed some docs, please explicitly link to the docs that you follow so we don't have to guess. Thanks!

Hey, @Aklapper
Thanks for the response.
I have followed this Media wiki doc to setup my environment upto "using roles section".
After that I started running test following selenium testing doc.

I have few suggestions for improving docs as well:

  1. I guess commands to be run on standard command prompt and inside VM should be more explicitly mentioned since newcomer like me

could get confused easily.

  1. The command hhvmsh is not working as mentioned in this doc but phpsh did.

Hi Everyone,

I am trying to setup the environment following https://www.mediawiki.org/wiki/MediaWiki-Vagrant

I am at step 6 to enable monobook, I get the attached error, can some one help?

Capture3.PNG (303×564 px, 22 KB)

Also, the VM Virtualbox has vagrant powered off as attached, does this have any relevance with the previous error? If so how to rectify it?

Capture4.PNG (388×460 px, 27 KB)

@Snehaniranjana: This sounds like a general setup question and hence might be out of scope for this task. Assuming you have searched for the error message "VT-x is disabled in the BIOS", what have you found out and what have you already tried to fix this error, and at which exact step when trying to fix the error did you run into which exact problem? Or in other words: What is your specific question? :) (Also, please post text as text if possible, as text in image files cannot be searched for.)

@Aklapper ,

The question I asked were from setting up the environment as given in the description of the page (Set up local development environment - refer to MediaWiki-Vagrant)

Step 6 : $ vagrant roles enable monobook --provision
has the following error,


NinAnand@DESKTOP-AP250NM MINGW64 ~/vagrant (master)
$ vagrant roles enable monobook --provision

> default: Checking if box 'debian/contrib-stretch64' is up to date...

> default: Clearing any previously set forwarded ports...

> default: Clearing any previously set network interfaces...

> default: Preparing network interfaces based on configuration...

default: Adapter 1: nat
default: Adapter 2: hostonly

> default: Forwarding ports...

default: 8080 (guest) => 8080 (host) (adapter 1)
default: 443 (guest) => 4430 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)

> default: Running 'pre-boot' VM customizations...

> default: Booting VM...

There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["startvm", "b3f34908-f958-41fa-85f4-25e2d3372671", "--type", "headless "]

Stderr: VBoxManage.exe: error: VT-x is disabled in the BIOS for all CPU modes (V ERR_VMX_MSR_ALL_VMX_DISABLED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component ConsoleWrap, interface IConsole

NinAnand@DESKTOP-AP250NM MINGW64 ~/vagrant (master)


I Figured the issue and fixed it. Thanks for you time and support.

Both of my previous posts were related.

Stderr: VBoxManage.exe: error: VT-x is disabled in the BIOS for all CPU modes (V ERR_VMX_MSR_ALL_VMX_DISABLED)

was due to the Virtualization Technology not enabled in the BIOS. Enabling them would fix the issue.

Also I faced Vagrant Timeout issue for vagrant up command later,

Got that fixed following the steps from environment setup link,

vagrant destroy; vagrant up.

I really appreciate your help on this.

Thanks,
Sneha

which OS would be better for this, Ubuntu or Windows 10?

Ubuntu. Windows might work, but I haven't used it in years, so I really don't know.

Very first time a chromium browser popped up but running it again I am not seeing anything.

Chrome visibility is determined by the value of DISPLAY environment variable. It's documented in the README file.

  1. Do we need to import data too to run the tests ?

No.

  1. And where we need to document our steps ?

I'm not sure. I'll leave that for @Etonkovidova to answer.

  1. I was unable to find any gmail group upon clicking the link given there on outreachy page.

I'll also leave that for @Etonkovidova to answer.

  1. I guess commands to be run on standard command prompt and inside VM should be more explicitly mentioned since newcomer like me

could get confused easily.

Can you please provide an example command that is confusing?

  1. The command hhvmsh is not working as mentioned in this doc but phpsh did.

That might be a bug in the documentation. You should leave a comment at Talk:MediaWiki-Vagrant.

I am at step 6 to enable monobook

Step 6 is optional. Unfortunately, that is not clear from the documentation.

Hi, My name is Huyen, and I am interested in this round. Thank you @zeljkofilipin for directing me up to the right place of tasks and discussion. I am still in setting up the environment on Ubuntu Debian and can not run "vagrant up". It always show me the red message

"VirtualBox is complaining that the installation is incomplete. Please
run VBoxManage --version to see the error message which should contain
instructions on how to fix this error."

I searched the help on the Internet to fix this problem, run "VBoxManage --version", "sudo apt-get install linux-headers-generic", reinstall VertualBox, and even with disable the secure boot, it is still get that red message. Please tell me what I can do!

Which exact Ubuntu version? What is the actual complete output of the command VBoxManage --version?
(Also see T204771#4639130, not sure general Vagrant setup issues are in scope for this task...)

I got the help from a friend and now it solved, but when I run $ vagrant roles enable monobook --provision from vagrant folder, it shows me this problem

Screenshot from 2018-10-05 10-59-57.png (1×1 px, 272 KB)

I have already have /puppet/environments/vagrant folder in /vagrant, but do not see any files in this folder. Why it is /vagrant/puppet/environments folder, but not /puppet/environments because I am already in /vagrant folder? How can I change this dir in config file?

Step 6 is optional. Unfortunately, that is not clear from the documentation.

Hi @huyen_thi_ha, running

$ vagrant roles enable monobook --provision

is optional. This might not be clear by looking at the documentation, but we don't require to run it for this microtask, still if you wish to run this for some other task, I guess people here will to guide you soon :)
All the best.

Hi! I am also an Outreachy applicant and I was trying to complete this microtask and I got struck with an issue. Any one with prior knowledge of handling VM ware, please help me getting out of this issue. I am pasting what I saw on the terminal:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'debian/contrib-stretch64' is up to date...
Your VM has become "inaccessible." Unfortunately, this is a critical error
with VirtualBox that Vagrant can not cleanly recover from. Please open VirtualBox
and clear out your inaccessible virtual machines or find a way to fix
them.

This is what I saw on screen when I typed $ vagrant up. What is the problem, please help, @Aklapper @zeljkofilipin @Etonkovidova ?

Hello @Iamishani, I am also an Outreachy applicant, I think I can help you with this issue. Which Operating System are you running this command on? This will help me get to the point better and quicker. :)

Thanks for helping @MaroonPixel, I am using it on Windows 10. Here is the screenshot attached :

image.png (150×722 px, 18 KB)

Okay. You can try one thing, I believe will solve this problem. Go to
"C:\Users\Admin\VirtualBox VMs\vagrant_default_{some unique ID}" and try changing the name of

vagrant_default_{some unique ID}.vbox-tmp to
vagrant_default_{some unique ID}.vbox

{Remove tmp keyword}
Try this once and let me know what showed up. If this didn't work, we can think of some other way out :)

Hi @MaroonPixel . Thanks you so much for the help. It worked at the instant as I did what you told, and it was very easy to do also.
Many thanks to you for helping me.
Wish you good luck for Outreachy candidature and life beyond.

Thanks, I'm happy it worked. I love helping people around me, don't hesitate to reach out if you face any difficulty 😄

Hi @zeljkofilipin @Etonkovidova @Aklapper ,

I performed all the steps required, but it got stuck here. May I know whether it is just taking very long time, or it is just stuck?
Also, how do I get out of this error? Any help will be appreciated.

image.png (249×721 px, 24 KB)

Thanks.

Hi @MaroonPixel, hmm, I don't see an error. (If you refer to the line "Only local connections are allowed.", that's just for your info.) How long have you waited?

Thanks for replying @Aklapper, actually not an error, the terminal just freezed here for a long time, until I terminated the process. So, I was just asking if there was anything that I were to do next, or the process will continue eventually.

It just freezed for about an hour, so I terminated it.

Hello @Aklapper, I am Erica. I am another candidate interested in Outreachy with this project. I am new to selenium and Automation testing, but I am willing to learn.
I am also facing an error when I try to run $ cd mediawiki. It shows:

bash: cd: mediawiki: No such file or directory

What can be the problem? Please help.

Hi there, @Erica9988 ! Welcome.
Are you sure that you are running Git bash in the same repository as mentioned in this doc (mentioned in description of this task?
This error could have occurred because you might not be in the right repository while running this command. Please make sure you are in the vagrant directory before running this.

Hi @MaroonPixel, please help me how can I know that I am in vagrant directory? How can I check which directory I am currently in? Thank you.

@Erica9988, the file path is written just above the space where you type commands. Like in this screenshot, I am in vagrant directory /Desktop/Repo/vagrant

image.png (61×720 px, 7 KB)

I would suggest you to have a look at basic git and shell commands. That'd be very helpful :)
Maybe, @zeljkofilipin @Etonkovidova can suggest some good sources 😄

@Erica9988: Please provide more info which steps you performed beforehand, which system you are on, which exact command you entered. On Linux systems, [[ https://en.wikipedia.org/wiki/Pwd | pwd ]] tells you the current directory you are in.

@Aklapper: Thanks for replying. I was in the home directory, as I read above the command typing area. Now, I have come in the repository 'vagrant' and this command worked.

@Aklapper I tried running the tests, but encountered an error which says

Tell the author that this fails on your system:
npm ERR!     bash ./tests/selenium/selenium.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls

Here is a screenshot of the same. I encountered this when everything was running fine and I was on the last step.

image.png (395×722 px, 53 KB)

Attached File : /vagrant/mediawiki/npm-debug.log{F26357057}

Hi! Outreachy applicant that just discovered this thread/page. Got the development environment setup. Would like to work on the 'welcome' test.

Hi, When I run the tests, Chrome doesn't open. It opened first time, but didn't open properly, and just after a flash, it shut down and now, chrome doedn't even open once. What can be the problem?

@Etonkovidova @zeljkofilipin @Aklapper

Hi @Iamishani, the default settings of Chrome is running in Headless mode. If you wish to see Chrome running, you need to explicitly set the environment variable DISPLAY.

The npm run selenium command will then look like this:

DISPLAY=1 npm run selenium

Hope this helps :)

*Updated***Solved by editting the wdio.conf.js and disable the related relPath.
I run into this problem when running test

Screenshot from 2018-10-08 11-13-03.png (1×1 px, 333 KB)

I run $ npm install wdio-mocha-framework and it still does not work.
I used "$git pull" in vagrant/mediawiki folder. Do I need to pull specific extension repository from mediawiki/extension master branch?

Does anyone have the same problem when running echo test that open the http://127.0.0.1:8080/ and try to log in , it fails and get this

alerts-and-notices-are-visible-after-logging-in.png (902×903 px, 262 KB)

how can we fix this?

Hi ,I have previously worked on manual testing and little bit of selenium, trying to complete the setup from quite sometime but I am getting error while doing vagrant up for Ubuntu, completed step by step procedure given for installation also tried to resolve error from different resources, but not able to find the solution.Can somebody please help me out with this?

vagrant.png (768×2 px, 586 KB)

@Etonkovidova @zeljkofilipin
Can you please guide me for this?

Hi everybody. I'm trying to follow the discussion and I would like to help out, but it's pretty much impossible. There's 5-10 different people with different problems and I'm not sure which of the problems are resolved and which are not.

Please create a subtask for each problem.

subtask.png (114×319 px, 10 KB)

Also, please copy/paste error messages instead of taking screenshots. Screenshots are useful and you can add them additionally.

  1. And where we need to document our steps ?

Outreachy/Participants#Application process steps says:

Make small contributions to the project and record them on the Outreachy program website Only applicants that make at least one contribution, record that contribution on the Outreachy website will be able eligible to be accepted as an intern. A contribution doesn't have to be merged or accepted to be recorded. Without this step you will not be able to start on your application.

  1. I was unable to find any gmail group upon clicking the link given there on outreachy page.

Could you please paste the link to the Outreachy page? I'm not sure what page are you referring to.

I've created sub-tasks for specific problems. I will follow up on there. If you have a problem, please create a sub-task (see T204771#4665946).

Hi,
Having started in September to talk with Elena, I began to see the changes of this task. I know that she told me that our email communication was enough but seeing the response times and the sub-tasks that were placed here that I had already resolved, I felt that I should link my progress here as well. Besides, I know that you can find yourself busy so I took the liberty to do the register and log in here to do that in order for my contributions to not fall obsolete.

@Etonkovidova

Hey! Anyone active on this ticket? @Aklapper @MaroonPixel @Etonkovidova ?
Actually, I was just preparing my Outreachy application for final submission and in place of 'contributions', since this first outreachy microtask was designed mainly to make the applicants get familiarized with wikimedia and phabricator, can I write 'completed microtask 1 and 2' there? Will it suffice?

Dear @Iamishani, I am extremely sorry for a late reply. Actually, I had been travelling today, so couldn't check my email on time. Hope you have submitted your application for Outreachy.
I am still working on learning and writing Selenium tests, contact me if you face any issues working on the project and need my help any time.

Etonkovidova claimed this task.