Did you try debugging the code?
Additionally, null pointer exception comes up when the object is not accessible.
Share your project in a zip file by exporting it if debugging doesn't help.
HI I tried debugging the code .
I declared : WebDriver driver= new ChromeDriver(); just before create portfolio test and it worked.
you need to write the below line only, else the driver won't be accessible to other functions.
driver = new ChromeDriver();