I added NUnit, NUnit Test Adapter, SpecFlow and my test are not recognized in test explorer. If I run the test from the feature file, with right click, it says that the build was succesful, but nothing happens and it's terminated in 0,001 sec. I check the default processor architecture too, but its ok. How can I solve it any ideas?
Login.feature
Feature: Login
Test the login functionality of application
Will verify if the username and password combinations are working as expected
#Regressiontest
#Browser:Chrome
Scenario Outline: Verify if the login functionality is working (+ve case)
Given I have navigated to my application
And I typed the <username> and <password>
When I click login button
Then I should see the EA page
Examples:
| username | password |
| admin | admin |
| karthik | karthik |
NUnit and NUnit3 Test Adapter versions weren't the same, so that's why the tests weren't recognized in test explorer.
Related
I am a QA automation engineer and in the web app I test there's a feature that creates Active Directory users.
My tools are - Selenium (Java), RemoteWebDriver, Selenium Grid (Docker)
I was trying to find ways to validate this process and came to a stop - this field (AD) is new
to me and I need to find a way to make sure the user was created and can be logged into in the
network.
I was trying to find a way to do this and came up with 2 options, where the first one is the least
preferred way:
Make a request (API? 3rd side tool?) to get the relevant user(s).
The issue:
A user created and registered in the AD doesn't necessarily mean that the client can log into it (at least by the way I understood how AD works), and so it loses the most important consequence of the feature.
Use a VM, get the AD user information (username + password: possible) and try to log into the VM using those details.
The issue:
I haven't came across a tool that does it, the closest thing is Robot class or WinAppDriver.
WinAppDriver seems like the best solution as of now although I don't know how to make the login process work since it's the process starts before the desktop is open and I don't know how to locate the username and password field, so I figured using Robot class seems like the simplest solution, if it works on a VM that is, which as of now doesn't seem like it does.
So, before advancing on learning how to use WinAppDriver with my current automation, I'd like and appreciate your opinions about the matter or if you have simpler solutions.
Thank you very much for reading!
• We can check whether a user is created successfully or not and if that user can log in to the AD domain or not by executing a script as below. It is a powershell script that auto logs in through remote desktop protocol in the other domain joined VM from an Azure domain joined VM that checks whether the recently created user can login or not.
Powershell script : -
cmdkey /list | ForEach-Object{if($_ -like "*target=TERMSRV/*"){cmdkey /del:($_ -replace " ","" -replace "Target:","")}}
echo "Connecting to 192.168.1.100"
$Server="192.168.1.100"
$User="Administrator"
$Password="AdminPassword"
cmdkey /generic:TERMSRV/$Server /user:$User /pass:$Password
mstsc /v:$Server
• In the above script, replace the ‘$user’ value by the user principal name of the newly created user, i.e., ‘$User=”testdemo#example.com”’ and the ‘$Password’ value by the password set for that user. Also, ensure that you replace and enter the correct IP address of the domain controller/AD server. Also, ensure that before executing the above powershell script, execute the below commands in an elevated (administrator privileges) powershell console.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Lastly, please ensure that while creating the user, the option ‘User must change password at next logon’, ‘Account is Disabled’, ‘Password never expires’ and ‘User cannot change password’ are unchecked and not selected.
• Also, you can use the below command line script for logging in to the domain joined Azure VM through RDP protocol. In the below command, replace the ‘username’ and ‘password’ with the username and password of the user created recently to log in to the Azure VM with this command line script. Also, replace the ‘TERMSRC’ with the hostname of the server system or the domain joined VM where the specified UNC path is located and replace the ‘some_unc_path’ with the actual path UNC path of the shared directory folder. Please execute the below command through elevated (administrator privileges) command prompt.
Command script: -
c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -nolog -command cmdkey /generic:TERMSRC/some_unc_path /user:username /pass:pa$$word; mstsc /v:some_unc_path
I was wondering if anyone successfully automated the LastPass CLI login process. I cannot seem to get around the password prompt, which I need to automate to make it useful.
I've tried commands like
echo <password> | lpass login <username>
or
yes <password> | lpass login <username>
I keep getting output saying the password is not correct. Has anyone automated this?
Thanks!
You would probably need to disable the pinetry password prompt so that lpass reads your password from standard input.
As the man pages say:
If pinentry program is unavailable, or if the LPASS_DISABLE_PINENTRY environment variable is set to 1, passwords will be read from standard input and a prompt will be displayed on standard error.
Meaning: It should work if you run it like this:
echo <password> | LPASS_DISABLE_PINENTRY=1 lpass login <username>
Or by just setting the environment variable for your shell (export LPASS_DISABLE_PINENTRY=1 in your ~/.profile or similar)
I user SSH to execute robot framework testcases (selenium), but there is no browser opened, the testcases is executed in the background? How can I solve this issue?
I want to execute robot framework testcases on win10, and I want to start the test via Jenkins which is installed on Linux, so I installed a SSH plugin in the Jenkins, then I create a job in Jenkins and execute below command via SSH
pybot.bat --argumentfile E:\project\robot_framework\Automation\logs\argfile1.txt E:\project\robot_framework\Automation
when I start the job, the testcase is executed in the background, but I need the test case to open the browser in the front.
ssh by definition executes commands in a different session than the current user's.
Especially considering your target is a Windows machine - imagine if you were logged in and working with desktop apps, and someone starts an app through ssh in your session - would be a little surprising (mildly put :), wouldn't it?
To get what you want - being able to monitor the execution, you could try runas /user:username command, but a satisfactory end result is not guaranteed (plus you have to provide the target user's password).
Another option is to use psexec, available on TechNet, but YMMV - you have to provide the target session id, some programs might not show up - or might not be maximizable, etc. The call format would be
psexec.exe -i 2 pybot.bat the_rest_of_the_args
I.e. a lot of effort and uncertainties, with minimal ROI :)
Divshot has a nice command line interface. The first thing you should do after installing it with npm is to login.
divshot login
It should open a browser tab/window, you login on the divshot website and you authorise the CLI client by pressing a button at the end of the process.
But I have all my development environment on a vagrant box. When I type "divshot login" nothing happens. No browser tab appears.
What should I do?
Run "divshot login" from your command line on you local machine and
follow the instructions to login.
Run "divshot auth:token" to get
your auth token from the command line.
When running commands that
interact with the Divshot API, use the flag "--token " to
give it authorization (on the vagrant box)
Another solution:
Run divshot login on your local computer
Inspect $HOME/.divshot/config/user.json, check it has a key token
Copy that file to the corresponding path on the other computer
Hi
I installed teamcity longtime ago, on my home computer.
I am trying to re-use it again now, but I forgot the admin username and password
Is there a default admin user name?
and how can I get the password?
Thank
From TeamCity 8 you can log in as a super user and change the password that way. You just need to use an empty username and last occurrence of the "super user authentication token" found in the logs\teamcity-server.log file as your password.
Please see the following for more information:
TeamCity 8 - http://confluence.jetbrains.com/display/TCD8/Super+User
TeamCity 9 - http://confluence.jetbrains.com/display/TCD9/Super+User
Ok, so you've forgot username and password in your teamcity instance.
How to reset password: described here.
How to get username:
go to the teamcity data directory
open config\database.properties file
there is connectionUrl property which points out to database which stores some teamcity settings
take a look at users table
Update
After you get the user name you can reset reset its password via the following(copied from linked answer):
Open a command prompt and go to \webapps\ROOT\WEB-INF\lib folder
Run the following: ..\..\..\..\jre\bin\java.exe -cp server.jar;common-api.jar;commons-codec-1.3.jar;util.jar;hsqldb.jar ChangePassword username newpassword
FYI, don't follow the advice of going through the users table. TeamCity is a quality product, so all passwords are salted/hashed (TC 9 below):
mysql [teamcity]> SELECT id, password FROM users;
+-----+---------------------------------------------------+
| id | password |
+-----+---------------------------------------------------+
| 21 | k9d9yuE13FtQm8eT:1e24ad492777f94dec0c905127d1ea48 |
| 13 | m1l79Yy03hjoxKdA:199d1ea48e28a78bafde576dd88e6de7 |
| 85 | gOBpYHipOrtEGbUx:88f234847c07085798f9a4f8726e39df |
+-----+---------------------------------------------------+