# Issues in running tests while exporting struct

**URL:** <https://discourse.julialang.org/t/issues-in-running-tests-while-exporting-struct/113253>\
**Category:** New to Julia\
**Created:** [April 19, 2024, 7:07pm UTC](https://discourse.julialang.org/t/issues-in-running-tests-while-exporting-struct/113253 "2024-04-19T19:07:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spinachboul](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spinachboul/32/208582_2.png) [@Spinachboul](https://discourse.julialang.org/u/Spinachboul)\
**Post date:** [April 19, 2024, 7:07pm UTC](https://discourse.julialang.org/t/issues-in-running-tests-while-exporting-struct/113253/1 "2024-04-19T19:07:46Z")

</div>

Hi! I am working on a package SGP where I am trying to export the in-struct functions but still getting the error:

sgp = SGP() # Create an instance of the SGP clas  
ERROR: UndefVarError: `SGP` not defined  
Stacktrace:  
[1] top-level scope  
@ c:\Users\mridu.julia\dev\SparseGaussianProcess\test\runtests.jl:5

Here is my SparseGaussianProcess.jl file code:  
module SparseGaussianProcess

export SGP  
abstract type AbstractSurrogateModel end  
mutable struct SGP \<: AbsractSurrogateModel  
# Member declarations and functions#  
end

And this is the runtests.jl file I have:  
using Test  
using SparseGaussianProcess # Import the module  
using Random

sgp = SGP() # Create an instance of the SGP clas  
@testset “SparseGaussianProcess.jl” begin

---

<div class="post-metadata">

**Author:** ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Post date:** [April 20, 2024, 6:07am UTC](https://discourse.julialang.org/t/issues-in-running-tests-while-exporting-struct/113253/2 "2024-04-20T06:07:52Z")

</div>

Perhaps a typo?

> AbsractSurrogateModel

Also, the following might help you.

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …
