7.8.25

 




If you are a New Jersey (NJ) resident working in Brooklyn, NY, here’s what you need to know about the three taxes mentioned and your state filing responsibilities:

1. NY - City Resident Tax

  • NYC Resident Tax applies only if you live in New York City, not just work there. As a NJ resident, you do not pay NYC resident tax, even if you commute daily to Brooklyn (part of NYC) for work.
  • This tax is meant for those whose primary residence is within NYC’s five boroughs; your NJ address means you’re exempt from NYC local income tax.

2. NY - Yonkers City Nonresident Tax

  • Yonkers Nonresident Earnings Tax is a special local tax for people who work in Yonkers but do not live there. The rate is typically 0.5% of wages earned in Yonkers.
  • However, if you only work in Brooklyn and not in Yonkers, you do not owe this tax.

3. NY - Yonkers City Resident Tax

  • Yonkers Resident Tax is only for people who live in Yonkers. As a New Jersey resident, this tax will not apply to you unless you change your domicile to Yonkers.

Do You Need to File Tax Returns in Both NJ & NY?

Yes, you are required to:

  • File a Nonresident NY State Tax Return (IT-203): You must report and pay NY state income tax on all income earned while working in NY, even if you live in NJ.
  • File a Resident NJ Tax Return (NJ-1040): NJ taxes you on all your income, regardless of where you earn it, but gives credit for taxes paid to NY to prevent double taxation.

Best Practice:

  • Always file the NY return first, then the NJ return. Report and claim the “credit for taxes paid to another state” on your NJ return to avoid being taxed twice.

What to Expect When Filing Tax Returns

  • You pay NY state tax on NY income, but not NYC or Yonkers taxes (since you’re a NJ resident and don’t work/live in Yonkers).
  • You get a NJ tax credit for taxes paid to NY (state only, not local), reducing or even eliminating your NJ tax liability on that income.
  • You might still owe NJ tax on non-NY income (e.g., interest, NJ-sourced freelance work).

Quick Reference Table

Tax Type

Applies to You?

Why?

NY City Resident Tax

No

Only for NYC residents, not commuters.

Yonkers Nonresident Tax

No

Only if you earn wages in Yonkers, not Brooklyn.

Yonkers Resident Tax

No

Only for Yonkers residents.

Key Points

  • Double-taxation is avoided due to the NJ tax credit for NY taxes paid.
  • Check your W-2: Make sure only NY state income tax (not NYC or Yonkers local tax) is withheld.
  • If your employer mistakenly withholds NYC tax, you’ll need to file for a refund with NY state at year’s end.

In summary: As a NJ resident working in Brooklyn, NY, file both NJ resident and NY nonresident returns, pay NY state income tax, and claim a NJ credit for those taxes. You do not owe NYC or Yonkers tax unless you actually live there or work in Yonkers. This system ensures you aren’t double-taxed, and any withholding errors (local taxes you don’t owe) should be fixed via refund claims during tax flinging

 


Just FYI:

US 2025 long-term capital gains tax rates 

Capital gains tax rate 

Single  

Married filing separately 

Married filing jointly 

Head of household 

0% 

$0 to $47,025 

$0 to $47,025 

$0 to $94,050 

$0 to $63,000 

15% 

$47,026 to $518,900 

$47,026 to $291,850 

$94,051 to $583,750 

$63,001 to $551,350 

20% 

$518,901 or more 

$291,851 or more 

$583,751 or more 

$551,351 or more 

8.4.24

Payment Gateway Testing components:-

E-comm Payment Gateway Testing:-


Payment Gateway vendors:- 

CyberSource( It also Supports TAX calculator)

authorize.net

Spring Citi

Integration Guide (citi.com)

Note:- CyberSource & Authorize.net both are VISA Companies



Payment Methods:-

Credit cards

Paypal: 

https://www.paypalobjects.com/en_AU/vhelp/paypalmanager_help/credit_card_numbers.htm

Google Pay

Apple Pay

Klarna

with & without 3DS authentication

TAX Calculator:-  VERTEX

4.11.22

Cypress Cucumber Setup

 


Install the plugin by running:

$ npm install --save-dev cypress-cucumber-preprocessor


Running Cucumber feature file with TAGS like @Smoke & @Regression:

$ npx cypress-tags run -e TAGS="@Smoke" --headed --browser chrome

26.10.22

Cypress.io Imp CMD's

$ npm -i init :  to create package.json file

$ node_modules/.bin/cypress open :  to open the test runner

Cypress run commands:- can use either of the below 4 commands

$(npm bin)/cypress run
./node_modules/.bin/cypress run
npx cypress run
yarn cypress run


Cypress run commands for 1 test case:-

$ npm run cy:run -- --record -- spec "cypress/integration/myspec.js" 

by default all test cases from cmd line runs in headless mode. if needed to run in browser? need to mention --headed in the end of cmd.

./node_modules/.bin/cypress run --headed                                    $ npm -i init :  to create package.json file

if we need to run spec's in specific browser we can specify that in cmd.

$ ./node_module/.bin/cypress run --browser chrome

$ ./node_module/.bin/cypress run --browser edge


Cypress framework folder structure:

fixture: for storing data in json or excel files.

Integration: for writing test spec's

Plugins: for setting browser settings like full screen, to handel cypress listeners events.

Support: customize cmds,  reusable methods, basically used to build POM

Videos: it stores the latest execution proofs of test specs


CMD to install mocha:-

$ npm install --save-dev mocha

CMD to install mochawesome reports:-

$ npm install --save-dev mochawesome


CMD to install IFrame in Cypress:

npm install -D cypress-iframe

CMD to override the execution url from terminal:-

$ ./node_module/.bin/cypress run --spec cypress/integration/UI/TestFramework1.js --env url=https://rahulshettyacademy.com/angularpractice/shop --headed

CMD to run scripts and have results in dashboard:-

npx cypress run --record --key <"your respective project key from dashboard">


22.9.22

Jenkins

Connect VM machine

Connect through SSH

 Jenkins installation:-

$> sudo apt-get update.

$> sudo apt install openjdk-8-jdk (OR) sudo apt install default-jdk

$> wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key |  sudo apt-key add -

wget --no-check-certificate -qO - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -

$> sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > \
/etc/apt/sources.list.d/jenkins.list'
$> sudo apt-get update
$> sudo apt-get install jenkins




sudo su - ubuntu

sudo apt-get update


20.9.22

GIT commands

 Working Directory:-

  • Project folder resides in your system.
  • It may or may not be tracked by Git.
  • Git tracking is initiated by "git init", it automatically creates a hidden .git folder.

Staging Area:-

  • Once you are in working directory , we have to specify which files are to be/not tracked by mentioning in the gitignore.
  • Some of the temp files need to be ignored which don't need to be tracking.
  • To add files into staging area, we "git add".

Commit:-   

  • Once files are moved into staging , we can commit them to repo, until it's not commited to git its not saved in repo.
  • "git commit -m "code change message".
  • Commit id will be generated once you commit any thing, to manage versioning.


Github:-

  • Once code is committed to your local repo, we need to publish it to remote server.
  • "git push"
  • commit id will help in revert the code to previous version.
  • A pointer to latest commit is called HEAD.


Master branch & Feature Branch.



git setup in GCP, Ubuntu instance:-

  • check if git is already exists?  git --version.
  • "mkdir  git_demo" : create a folder for repo.
  • ls -ltr and ls -ltra(hidden files)
  • run "git init" to track changes in this folder
  • "ls -ltra"
  • "ls -ltr .git"
  • "cat .git/HEAD" will show the head pointer.
  • "git status" to track/see the changes in repo.
  • "git add ."  this add all the files in the current directory to tracking, "." mean current directory files, no hidden files will be added for tracking.
  • "git rm --cached <file>..." to unstage/remove files.
  • "git config --global user.email xyz@gmail.com"
  • "git_demo$ git config --global user.name xyz"
  • "git remote add origin https://github.com/xyz/GitRemoteRepoTest.git"
  • "git push"
  • "git push origin master". enter username"xyz" and personal access token.
  • Refer:- https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

Cloning a Repo:- 
  • Go to github and copy the url for clone "https://github.com/xyz/GitRemoteRepoTest.git"
  • "git clone https://github.com/xyz/GitRemoteRepoTest.git" run this command in new folder for creating the git repo.
  • git pull https://github.com/xyz/GitRemoteRepoTest.git ( to pull updated changes from repo).
GIT Branching:-

  • "Git branch <anybranch name>".      to create new branch
  • git branch.                                          to list the branches
  • git checkout <newbranch name>.    this will make HEAD point to new branch.
  • git log --graph --pretty=oneline
GIT STASH:-

git stash -u
git stash pop

GIT REVERT:-

git revert <commit id>

GIT DIFF:- To find difference between two versions of the file.

git diff <commit id>


MERGING BRANCHES:-

Git Merge:

git merge <source branch name/feature branch name>    run this cmd from the master branch.

Git Rebase:

It's more used to get the latest master branch code to feature branch, once after the feature branch code is tested and merged into master branch.  it helps the feature branch to rebase the latest code from master.

1. "git checkout <featurebranch name>"      2. "git rebase master"






19.9.22

Useful Cypress commands

 

1. To Run Single test :

npx cypress open --config testFiles="/Users/rajeshvarma/Documents/CypressProj/cypress/integration/UIScripts/tc1.spec.js"    ---------------------------------------------------------------------------------------------------------------------------  

2. To run cypress multiple test cases option:

npx cypress open

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

3. crossbrowser testing:-

$ npx cypress run --browser chrome --spec “cypress/integration/examples/tests/e2e_test.spec.js”

update package.json file with below entries for crossbrowser:

"scripts": {
"cy:run:chrome": "cypress run --browser chrome",
"cy:run:firefox": "cypress run --browser firefox"

}

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

4. Cypress reporting:-

$ npm install mochawesome.   OR.      $ npm install junit

 update cypress.json file with below entries :-

{
"reporter": "mochawesome",
"reporterOptions":
{
"reportDir": "cypress/results",
"overwrite": false,
"html": true,
"json": true
}

}



$ npx cypress run --reporter mochawesome --spec “cypress/integration/examples/tests/e2e_test.spec.js”



Cypress.json config file for JUnit:--

{
"reporter": "junit",
"reporterOptions":
{
"reportDir": "cypress/results",
"mochaFile": "results/my-test-output.xml",
"toConsole": true
}

}


$ npx cypress run --reporter junit \ --reporter-options “mochaFile=results/my-test-output.xml,toConsole=true”

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







22.8.18

API status code assertions



S-1: Status Code Assertion:-




S-2: Access Points Parameterization:-




Define access points as below




S-3: Payload – Parameterization

Define payload parameters at test suite level and refer them in pay load



S-4: Path Parameterization:-

Define property at test suite level and do the following in the request tab


S-5:Data Driven Testing:-

Add data source



Add Data source loop




Create XL – file as below





Define File path and sheet name and on run in configuration section





It will load the data as below




Click on Rest request à Form see the navigation


Request will be modify as below





S-6:Validate the response using script:-
import groovy.json.*

//grab the response
def ResponseMessage = testRunner.testCase.getTestStepByName("Req1").getPropertyValue("response")
def qa = new JsonSlurper().parseText(ResponseMessage)

//verify the slurper isn't empty
assert !(qa.isEmpty())
def arr = qa.id

//verify the Id, Type and Guid aren't null
log.info (qa.id)
log.info(arr.size())
//log.info(arr.sort())
assert qa.id!=null
assert qa.location!=null

for (int i=0;i<arr.size();i++)
{
                  log.info(arr[i])
}

S-7:- Convert XML to Json response and compare with expected values
//def response = context.expand('${Request 1#Response}')
//def User = new XmlParser().parseText(response)

import groovy.json.JsonSlurper
def response = context.expand( '${TryAddingAPIWithNewService#Response}' )
def slurper = new JsonSlurper() 
def result = slurper.parseText(response)
def errorMessageWhenAddingAPIWithNewServiceDisabled = result.faultstring.toString() 
log.info errorMessageWhenAddingAPIWithNewServiceDisabled

assert errorMessageWhenAddingAPIWithNewServiceDisabled == "The feature for adding an API or API version with new service is disabled.  For assistance, please contact the Site Administrator."

S- 8: Concatenation




S-9: Test Suite Report:-
Click on below icon to generate common reports and click on ‘Ok’.



Following report will be generated





S-10: JsonPath Match - Verifies the value specified by a JsonPath expression matches some expected value



Click on ‘Select node from to validate from current page’ and select any node. Click on ‘Ok and Save’




Assertion is passed as expected




S-11: JsonPath Existence Match - Verifies the element specified by a JsonPath expression exists in the target JSON




Click on ‘135’,





Click on ‘Save’ and send request